|
BDE 4.39.x Production Release
|
#include <bslma_destructorproctor.h>
This class implements a proctor that, unless its release method has previously been invoked, automatically destroys a managed object upon destruction by invoking the (managed) object's destructor.
Public Member Functions | |
| DestructorProctor (TYPE *object) | |
| ~DestructorProctor () | |
| void | release () |
| void | reset (TYPE *object) |
|
inlineexplicit |
Create a destructor proctor that conditionally manages the specified object (if non-zero) by invoking the destructor of the object managed by this proctor (if not released – see release) upon destruction.
|
inline |
Destroy this destructor proctor, and destroy the object it manages (if any) by invoking the destructor of the (managed) object. If no object is currently being managed, this method has no effect.
|
inline |
Release from management the object currently managed by this proctor. If no object is currently being managed, this method has no effect.
|
inline |
Set the specified object as the object to be managed by this proctor.
object is non-zero.release when reusing this object.