[#BloombergLP-bslma-DeallocatorGuard-2constructor]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/DeallocatorGuard.adoc[DeallocatorGuard]::DeallocatorGuard
:relfileprefix: ../../../
:mrdocs:

Create a deallocator guard that unconditionally manages the specified `memory` block, and that uses the specified `allocator` to deallocate `memory` upon destruction of this guard&period; The behavior is undefined unless `memory` and `allocator` are non&hyphen;zero, and `allocator` supplied `memory`&period; Note that `allocator` must remain valid throughout the lifetime of this guard&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
DeallocatorGuard(
    void* memory,
    ALLOCATOR* allocator);
----


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