class KStaticDeleter

little helper class to clean up static objects that are held as pointer. More...

Definition#include <kstaticdeleter.h>
Template formKStaticDeleter<templateclass type>
InheritsKStaticDeleterBase
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

little helper class to clean up static objects that are held as pointer.

A typical use is static KStaticDeleter<MyClass> sd;

MyClass::self() { if (!_self) { _self = sd.setObject(new MyClass()); } }

 KStaticDeleter ()

type * setObject ( type *obj, bool isArray = false)

sets the object to delete and registers the object to be deleted to KGlobal. if the given object is 0, the former registration is unregistred

Parameters:
isArraytells the destructor to delete an array instead of an object

void  destructObject ()

[virtual]

Reimplemented from KStaticDeleterBase.

KStaticDeleter ()

[virtual]


Generated by: prospector@porky.devel.redhat.com on Thu Aug 24 05:35:47 2000, using kdoc 2.0a36.