Pues eso, qué es lo que hay que hacer para que cuando no se libera memoria reservada previamente, el programa EXE genere un fichero "hb_out.log" con el informe del estado de la memoria
Gracias compañeros!!!
CREATE_CLASS( "THASHCURSOR", THASHCURSOR, THASHCURSOR_IVARCOUNT )
/* Metodos */
METHOD( "NEW", THASHCURSOR_NEW )
METHOD( "GETCURSOR", THASHCURSOR_GETCURSOR )
METHOD( "SETCURSOR", THASHCURSOR_SETCURSOR )
METHOD( "RECNO", THASHCURSOR_RECNO )
METHOD( "RECCOUNT", THASHCURSOR_RECCOUNT )
METHOD( "GOTO", THASHCURSOR_GOTO )
METHOD( "GOTOP", THASHCURSOR_GOTOP )
METHOD( "GOBOTTOM", THASHCURSOR_GOBOTTOM )
METHOD( "SKIP", THASHCURSOR_SKIP )
METHOD( "SKIPPER", THASHCURSOR_SKIPPER )
METHOD( "NEXT", THASHCURSOR_NEXT )
METHOD( "PRIOR", THASHCURSOR_PRIOR )
METHOD( "EOF", THASHCURSOR_EOF )
METHOD( "BOF", THASHCURSOR_BOF )
METHOD( "FIELDCOUNT", THASHCURSOR_FIELDCOUNT )
METHOD( "FIELDGET", THASHCURSOR_FIELDGET )
METHOD( "GETBYNAME", THASHCURSOR_GETBYNAME )
METHOD( "FIELDNAME", THASHCURSOR_FIELDNAME )
METHOD( "FIELDLEN", THASHCURSOR_FIELDLEN )
METHOD( "FIELDTYPE", THASHCURSOR_FIELDTYPE )
METHOD( "SCAN", THASHCURSOR_SCAN )
METHOD( "ASARRAY", THASHCURSOR_ASARRAY )
METHOD( "CLOSE", THASHCURSOR_CLOSE )
END_CLASS
/***
* Metodo: NEW
* Uso: Constructor de la clase
* Parametros: Ninguno
* Devuelve: Self, un objeto inicializado
*/
HB_METHOD( THASHCURSOR_NEW )
{
PHB_ITEM pSelf = hb_pSelf();
HASHCURSORP hc = hb_xgrab( sizeof( HASHCURSOR ) );
if( hc )
{
PHB_ITEM paValue = hb_param( 1, HB_IT_ARRAY );
hc->paValue = hb_itemNew( NULL );
if( paValue )
{
hb_itemCopy( hc->paValue, paValue );
}
else
{
hb_arrayNew( hc->paValue, 0 );
}
if( hb_arrayLen( hc->paValue ) > 0 )
{
setRecNo( hc, 1 );
setEOF( hc, HB_FALSE );
}
else
{
setRecNo( hc, 0 );
setEOF( hc, HB_TRUE );
}
setBOF( hc, HB_TRUE );
setFound( hc, HB_FALSE );
hb_arraySetPtr( pSelf, IVAR_HASHCURSOR, hc );
}
/* Devuelve SELF */
hb_itemReturnRelease( pSelf );
}
if( ! s_pFirstBlock )
{
pMem->pPrevBlock = NULL;
s_pFirstBlock = pMem;
}
else
{
pMem->pPrevBlock = s_pLastBlock;
s_pLastBlock->pNextBlock = pMem;
}
s_pLastBlock = pMem;
pMem->pNextBlock = NULL;
pMem->u32Signature = HB_MEMINFO_SIGNATURE;
HB_FM_SETSIG( HB_MEM_PTR( pMem ), nSize );
pMem->nSize = nSize; /* size of the memory block */
s_nMemoryConsumed += nSize + sizeof( HB_COUNTER );
if( s_nMemoryMaxConsumed < s_nMemoryConsumed )
s_nMemoryMaxConsumed = s_nMemoryConsumed;
s_nMemoryBlocks++;
if( s_nMemoryMaxBlocks < s_nMemoryBlocks )
s_nMemoryMaxBlocks = s_nMemoryBlocks;
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 67 guests