BDE 4.14.0 Production release
|
#include <bslma_destructorproctor.h>
Public Member Functions | |
DestructorProctor (TYPE *object) | |
~DestructorProctor () | |
void | release () |
void | reset (TYPE *object) |
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.
|
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. The behavior is undefined unless object
is non-zero. Note that this method releases any previously-managed object from management (without destroying it), and so may be invoked with or without having called release
when reusing this object.