Proctor that conditionally manages and deallocates a block of memory.
Synopsis
Declared in <bslma_deallocatorproctor.h>
template<class ALLOCATOR>
class DeallocatorProctor;
Description
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.
Member Functions
Name |
Description |
|
Create a deallocator proctor that conditionally manages memory. |
|
Destroy this proctor and deallocate any managed memory. |
Release from management the block of memory currently managed by this proctor. If no memory is currently being managed, this method has no effect. |
|
Set the memory block managed by this proctor. |
Created with MrDocs