Thank you Toe.

Teo Fonrouge wrote:
> 
> Even that this is not the solution to your current problem, I highly  
> suggest you to use a nice feature on QT called "guarded pointers".  
> Please check the following link:
> 
> http://doc.trolltech.com/4.2/qpointer.html#details
> 
> This is a nice feature that helps to check if a pointer to a QT  
> object, really is currently in use or has been released.
> 

Certainly this will be useful. I will experiment with this.

Quick constructor skeleton:

HB_FUNC( QT_QWIDGET )
{
   void ** ph = ( void ** ) hb_gcAlloc( sizeof( void * ), QObject_release );
   QPointer< QWidget > pObj = new QWidget( hbqt_par_QWidget( 1 ), (
Qt::WindowFlags ) hb_parni( 2 ) ) ;
   * ph = pObj;
   hb_retptrGC( ph );
}

Is working fine. One guard is done with.
Sadly this only operates on <QObject> derived classes.
Please keep on posting if you find any info about other
type of classes too, a very important matter.

Regards
Pritpal Bedi

-- 
View this message in context: 
http://www.nabble.com/HBQT---HBXBP-%3A-Garbage-Collection-tp25813841p25865463.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to