[#BloombergLP-bslma-RawDeleterProctor]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::RawDeleterProctor
:relfileprefix: ../../
:mrdocs:

This class implements a proctor that, unless its `release` method has previously been invoked, automatically deletes a managed object upon destruction by first invoking the object&apos;s destructor, and then invoking the `deallocate` method of an allocator (or pool) of parameterized `ALLOCATOR` type supplied to it at construction&period; 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 proctor object&period;

== Synopsis

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

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

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/RawDeleterProctor/2constructor.adoc[`RawDeleterProctor`]         [.small]#[constructor]#
| Create a raw deleter proctor that conditionally manages the specified `object` (if non&hyphen;zero), and that uses the specified `allocator` to delete the object managed by this proctor (if not released &hyphen;&hyphen; see `release`) upon destruction&period; The behavior is undefined unless `allocator` is non&hyphen;zero and supplied the memory for `object` (if non&hyphen;zero)&period; Note that `allocator` must remain valid throughout the lifetime of this proctor&period;
| xref:BloombergLP/bslma/RawDeleterProctor/2destructor.adoc[`&#126;RawDeleterProctor`] [.small]#[destructor]#
| Destroy this raw deleter proctor, and delete the object it manages (if any) by first invoking the destructor of the (managed) object, and then invoking the `deallocate` method of the allocator (or pool) that was supplied at the construction of this proctor&period; If no object is currently being managed, this method has no effect&period;
| xref:BloombergLP/bslma/RawDeleterProctor/release.adoc[`release`] 
| Release from management the object currently managed by this proctor&period; If no object is currently being managed, this method has no effect&period;
| xref:BloombergLP/bslma/RawDeleterProctor/reset.adoc[`reset`] 
| Set the specified `object` as the object to be managed by this proctor&period; The behavior is undefined unless `object` is non&hyphen;zero and was allocated from the allocator (or pool) supplied at construction&period; Note that this method releases any previously&hyphen;managed object from management (without deleting it), and so may be invoked with or without having called `release` when reusing this object&period;
|===



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