Add single TQObject root parent for all guarded pointers.

This helps keeping the object root list shorter, speeding up operations
which require lot of TQObject trees. This relates to TDE/tdebase#309.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/66/head r14.1.0
Michele Calgaro 2 years ago
parent 044c03f28e
commit b167d09c43
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -194,9 +194,10 @@
/* Internal classes */
static TQObject *__ptrpriv_root_obj = new TQObject(0, "_ptrpriv_root");
TQGuardedPtrPrivate::TQGuardedPtrPrivate( TQObject* o)
: TQObject(0, "_ptrpriv" ), obj( o )
: TQObject(__ptrpriv_root_obj, "_ptrpriv" ), obj( o )
{
if ( obj )
connect( obj, SIGNAL( destroyed() ), this, SLOT( objectDestroyed() ) );

Loading…
Cancel
Save