Hello All, Here are my latest lab findings on Qt:
cppstub.cpp : contains only one function ========= void * operator new( size_t nSize ) { if( nSize == 0 ) { nSize = 1; } return hb_xgrab( nSize ); } hbqt/.../Q*.cpp =========== QT_G_FUNC( hbqt_gcRelease_QWidget ) { QGC_POINTER_QWidget * p = ( QGC_POINTER_QWidget * ) Cargo; if( p && p->bNew ) { if( p->ph && p->pq ) { const QMetaObject * m = ( ( QObject * ) p->ph )->metaObject(); if( ( QString ) m->className() != ( QString ) "QObject" ) { HB_TRACE( HB_TR_DEBUG, ( "YES_rel_QWidget /.\\ ph=%p pq=%p", p->ph, (void *)(p->pq) ) ); delete ( ( QWidget * ) p->ph ); //////////////////////////////////// hb_xfree( p->ph ); //////////////////////////////////// HB_TRACE( HB_TR_DEBUG, ( "YES_rel_QWidget \\./ ph=%p pq=%p", p->ph, (void *)(p->pq) ) ); p->ph = NULL; } else { HB_TRACE( HB_TR_DEBUG, ( "NO__rel_QWidgetph=%p pq=%p", p->ph, (void *)(p->pq) ) ); } } else { HB_TRACE( HB_TR_DEBUG, ( "DEL_rel_QWidget : Object already deleted!" ) ); } } else { HB_TRACE( HB_TR_DEBUG, ( "PTR_rel_QWidget : Object not created with new()" ) ); p->ph = NULL; } } Produces almost 0 unreleased memory blocks. I have tested extensively and have found no issues. demoXBP.exe exits properly, consumes very little mem if new dialogs are opened and closed. hbXBP destroys objects - child first then parent. demoQT exits with GPF - hb_xfree() called with invalid pointer. demoQT does not release objects per parent-child hirarchy. hbIDE is releasing with a GPF but I know what is possible reason, am after that. Overall this is a step forward in understanding why Qt is not memory is kept consumed. Hope someone will extend experiments. ----- enjoy hbIDEing... Pritpal Bedi _a_student_of_software_analysis_&_design_ -- View this message in context: http://n2.nabble.com/hbQT-hbcppmm-hb-xfree-Latest-Findings-tp4620137p4620137.html Sent from the harbour-devel mailing list archive at Nabble.com. _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour