BloombergLP::bslma::DestructorProctor

Proctor that conditionally manages and destroys an object.

Synopsis

Declared in <bslma_destructorproctor.h>

template<class TYPE>
class DestructorProctor;

Description

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.

Member Functions

NameDescription
DestructorProctor [constructor]Create a destructor proctor that conditionally manages an object.
~DestructorProctor [destructor]Destroy this proctor and destroy any managed object.
release Release from management the object currently managed by this proctor. If no object is currently being managed, this method has no effect.
reset Set the object managed by this proctor.