[#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&period;

== Synopsis

Declared in `&lt;bslma&lowbar;deallocatorproctor&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
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&period; The managed memory must have been provided by this allocator (or pool), which must remain valid throughout the lifetime of the proctor object&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/DeallocatorProctor/2constructor.adoc[`DeallocatorProctor`]         [.small]#[constructor]#
| Create a deallocator proctor that conditionally manages memory&period;
| xref:BloombergLP/bslma/DeallocatorProctor/2destructor.adoc[`&#126;DeallocatorProctor`] [.small]#[destructor]#
| Destroy this proctor and deallocate any managed memory&period;
| xref:BloombergLP/bslma/DeallocatorProctor/release.adoc[`release`] 
| Release from management the block of memory currently managed by this proctor&period; If no memory is currently being managed, this method has no effect&period;
| xref:BloombergLP/bslma/DeallocatorProctor/reset.adoc[`reset`] 
| Set the memory block managed by this proctor&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
