|
UtiLite
0.3.1
A lite utilities library
|
#include <UDestroyer.h>
Public Member Functions | |
| UDestroyer (T *doomed=0) | |
| bool | setDoomed (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.
| UDestroyer< T >::UDestroyer | ( | T * | doomed = 0 | ) | [inline] |
The constructor. Set the doomed object (take ownership of the object). The object is deleted when this object is deleted.
| bool UDestroyer< T >::setDoomed | ( | T * | doomed | ) | [inline] |
Set the doomed object. If a doomed object is already set, the function returns false.
| doomed | the doomed object |
1.7.6.1