Proctor that conditionally manages and deallocates a block of memory.
Declared in <bslma_deallocatorproctor.h>
template<class ALLOCATOR>
class DeallocatorProctor;
This class implements a proctor that, unless its release method has previously been invoked, automatically deallocates a block of managed memory upon destruction by invoking the deallocate method of an allocator (or pool) of parameterized ALLOCATOR type supplied to it at construction. The managed memory must have been provided by this allocator (or pool), which must remain valid throughout the lifetime of the proctor object.
| Name | Description |
|---|---|
DeallocatorProctor [constructor] | Create a deallocator proctor that conditionally manages memory. |
~DeallocatorProctor [destructor] | Destroy this proctor and deallocate any managed memory. |
release | Release from management the block of memory currently managed by this proctor. If no memory is currently being managed, this method has no effect. |
reset | Set the memory block managed by this proctor. |