[#BloombergLP-bdlma-AutoReleaser]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::AutoReleaser
:relfileprefix: ../../
:mrdocs:

This class implements a proctor that invokes the `release` method of its managed allocator or pool at destruction unless the proctor&apos;s `release` method is invoked&period;

== Synopsis

Declared in `&lt;bdlma&lowbar;autoreleaser&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
class AutoReleaser;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlma/AutoReleaser/2constructor.adoc[`AutoReleaser`]         [.small]#[constructor]#
| Create a proctor object to manage the specified `originalAllocator`&period;
| xref:BloombergLP/bdlma/AutoReleaser/2destructor.adoc[`&#126;AutoReleaser`] [.small]#[destructor]#
| Destroy this proctor object&period;
| xref:BloombergLP/bdlma/AutoReleaser/release.adoc[`release`] 
| Release from management the allocator or pool currently managed by this proctor&period; If no allocator or pool is currently being managed, this method has no effect&period;
| xref:BloombergLP/bdlma/AutoReleaser/reset.adoc[`reset`] 
| Set the specified `newAllocator` as the allocator or pool to be managed by this proctor&period;
|===



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