Public Member Functions | |
DESTRUCTEUR_DE_ (TYPE &objet) | |
virtual void | operator() (void) |
performs the destruction More... | |
Static Public Member Functions | |
static const int | Ajout (DESTRUCTEUR_GENERIQUE_ &objet) |
adds a destruction object to the list of destructions More... | |
Static Public Attributes | |
static std::list < DESTRUCTEUR_GENERIQUE_ * > * | Destructeurs =0 |
Purpose
The DESTRUCTEUR_DE_ class allows the user to program - at any moment - the destruction of an object at the end of the process.
Usage
In this example the POINT_ ptrPoint will be destroyed at the end of the process (atexit). POINT_ *ptrPoint = new POINT_ ;<BR> DESTRUCTEUR_DE_<POINT_> *ptrDestruction = new DESTRUCTEUR_DE_<POINT_>( *ptrPoint ) ; Note that neither ptrPoint, nor ptrDestruction should be destroyed by the user.
Design description
The destruction object must be created dynamicaly because it suscribes himself in the list of destruction to be performed at the end of the process.
|
inlinevirtual |
performs the destruction
Implements DESTRUCTEUR_GENERIQUE_.
|
staticinherited |
adds a destruction object to the list of destructions
Adds a destruction object to the list of actions to be performed at the end of the process