[#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'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 proctor object. == Synopsis Declared in `<bslma_rawdeleterproctor.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class TYPE, class ALLOCATOR> 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‐zero), and that uses the specified `allocator` to delete the object managed by this proctor (if not released ‐‐ see `release`) upon destruction. The behavior is undefined unless `allocator` is non‐zero and supplied the memory for `object` (if non‐zero). Note that `allocator` must remain valid throughout the lifetime of this proctor. | xref:BloombergLP/bslma/RawDeleterProctor/2destructor.adoc[`~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. If no object is currently being managed, this method has no effect. | xref:BloombergLP/bslma/RawDeleterProctor/release.adoc[`release`] | Release from management the object currently managed by this proctor. If no object is currently being managed, this method has no effect. | xref:BloombergLP/bslma/RawDeleterProctor/reset.adoc[`reset`] | Set the specified `object` as the object to be managed by this proctor. The behavior is undefined unless `object` is non‐zero and was allocated from the allocator (or pool) supplied at construction. Note that this method releases any previously‐managed object from management (without deleting it), and so may be invoked with or without having called `release` when reusing this object. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#