class KStaticDeleter
|
Little helper class to clean up static objects that are
held as pointer. More... |
|
|
Public Methods
Little helper class to clean up static objects that are
held as pointer.
When the library is unloaded, or the app terminated, all static deleters
are destroyed, which in turn destroys those static objects properly.
A typical use is
KStaticDeleter ()
| KStaticDeleter |
type * setObject ( type *obj, bool isArray = false)
| setObject |
Sets the object to delete and registers the object to be
deleted to KGlobal. If the given object is 0, the former
registration is unregistered.
Parameters:
isArray | tells the destructor to delete an array instead of an object
|
type * setObject ( type* & globalRef, type *obj, bool isArray = false)
| setObject |
Sets the object to delete and registers the object to be
deleted to KGlobal. If the given object is 0, the former
registration is unregistered.
Parameters:
globalRef | the static pointer where this object is stored
This pointer will be reset to 0 after deletion of the object.
|
isArray | tells the destructor to delete an array instead of an object
|
void destructObject ()
| destructObject |
[virtual]
Destructs the object. This has the same effect as deleting
the KStaticDeleter.
Reimplemented from KStaticDeleterBase.
~KStaticDeleter ()
| ~KStaticDeleter |
[virtual]
Generated by: caleb on tcdevel on Tue Jan 28 12:54:04 2003, using kdoc $. |