[#BloombergLP-bslma-RawDeleterGuard] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::RawDeleterGuard :relfileprefix: ../../ :mrdocs: Guard that unconditionally deletes a managed object on destruction. == Synopsis Declared in `<bslma_rawdeleterguard.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class TYPE, class ALLOCATOR> class RawDeleterGuard; ---- == Description This class implements a guard that unconditionally deletes a managed object upon destruction by first invoking the object's destructor, and then invoking the `deallocate` method of an allocator (or pool) of parameterized `ALLOCATOR` type supplied to it at construction. The managed object of parameterized `TYPE` must have been created using memory provided by this allocator (or pool), which must remain valid throughout the lifetime of the guard object. == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/RawDeleterGuard/2constructor.adoc[`RawDeleterGuard`] [.small]#[constructor]# | Create a raw deleter guard that manages the specified object. | xref:BloombergLP/bslma/RawDeleterGuard/2destructor.adoc[`~RawDeleterGuard`] [.small]#[destructor]# | Destroy this guard and delete its managed object. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#