#include <UDestroyer.h>
Public Member Functions | |
bool | setDoomed (T *doomed) |
UDestroyer (T *doomed=0) | |
~UDestroyer () | |
Private Member Functions | |
void | operator= (const UDestroyer< T > &) |
UDestroyer (const UDestroyer< T > &) | |
Private Attributes | |
T * | doomed_ |
This class is used to delete a dynamically created objects. It was mainly designed to remove dynamically created Singleton. Created on the stack of a Singleton, when the application is finished, his destructor make sure that the Singleton is deleted.
Definition at line 34 of file UDestroyer.h.
|
inline |
The constructor. Set the doomed object (take ownership of the object). The object is deleted when this object is deleted.
Definition at line 41 of file UDestroyer.h.
|
inline |
Definition at line 43 of file UDestroyer.h.
|
private |
|
private |
|
inline |
Set the doomed object. If a doomed object is already set, the function returns false.
doomed | the doomed object |
Definition at line 57 of file UDestroyer.h.
|
private |
Definition at line 74 of file UDestroyer.h.