From b167d09c43be6c8b7d30f0d4fb1bf1e86c51b8a7 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 13 Feb 2023 00:49:41 +0900 Subject: 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 --- src/kernel/qguardedptr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kernel/qguardedptr.cpp b/src/kernel/qguardedptr.cpp index 803e75e18..3ac27e7a7 100644 --- a/src/kernel/qguardedptr.cpp +++ b/src/kernel/qguardedptr.cpp @@ -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() ) ); -- cgit v1.2.1