This is the latest stub.
One run of hbIDE - enter/exit reveals that
new() is issued 1439 times
delete() is issued 300 times
hb_out.log reports 1139 unreleased blocks.
===========================
const char * __hbmk2_hbcppmm( void )
{
return "HBCPPMM";
}
int getnew( void )
{
static int i = 0;
return ++i;
}
int getdelete( void )
{
static int i = 0;
return ++i;
}
void * operator new( size_t nSize )
{
if( nSize == 0 )
nSize = 1;
void * ptr = hb_xgrab( nSize );
HB_TRACE( HB_TR_ALWAYS, ( " new( %p ) %i %i", ptr, nSize,
getnew() ) );
return ptr;
}
void operator delete( void * ptr )
{
if( ptr )
{
HB_TRACE( HB_TR_ALWAYS, ( "< delete( void * %p ) %s %i", ptr, "
0", getdelete() ) );
hb_xfree( ptr );
HB_TRACE( HB_TR_ALWAYS, ( " ( void * ) %s", "
1 >" ) );
}
}
========================
Can someone try on his system too ?
-----
enjoy hbIDEing...
Pritpal Bedi
_a_student_of_software_analysis_&_design_
--
View this message in context:
http://n2.nabble.com/hbQT-c-stub-GC-Some-food-for-thoughts-tp4483724p4488200.html
Sent from the harbour-devel mailing list archive at Nabble.com.
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour