[#BloombergLP-bslma-DeallocatorProctor] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::DeallocatorProctor :relfileprefix: ../../ :mrdocs: Proctor that conditionally manages and deallocates a block of memory. == Synopsis Declared in `<bslma_deallocatorproctor.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- 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 [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/DeallocatorProctor/2constructor.adoc[`DeallocatorProctor`] [.small]#[constructor]# | Create a deallocator proctor that conditionally manages memory. | xref:BloombergLP/bslma/DeallocatorProctor/2destructor.adoc[`~DeallocatorProctor`] [.small]#[destructor]# | Destroy this proctor and deallocate any managed memory. | xref:BloombergLP/bslma/DeallocatorProctor/release.adoc[`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. | xref:BloombergLP/bslma/DeallocatorProctor/reset.adoc[`reset`] | Set the memory block managed by this proctor. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#