[#BloombergLP-bslma-DeallocateBytesProctor] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::DeallocateBytesProctor :relfileprefix: ../../ :mrdocs: This class implements a proctor that, unless its `release` method has previously been invoked, automatically deallocates a managed block of memory upon destruction by invoking the `deallocate` method of an allocator (or pool) of parameterized `ALLOCATOR` type supplied to it at construction. The managed memory block must have been provided by the supplied allocator (or pool); the allocator (or pool) must remain valid throughout the lifetime of the proctor object. If `ALLOCATOR` is a non‐pointer type, it is assumed to be STL compatible; otherwise it is assumed have the same deallocation interface as `bslma::Allocator`. == Synopsis Declared in `<bslma_deallocatebytesproctor.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOCATOR> class DeallocateBytesProctor; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/DeallocateBytesProctor/2constructor-01.adoc[`DeallocateBytesProctor`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bslma/DeallocateBytesProctor/2destructor.adoc[`~DeallocateBytesProctor`] [.small]#[destructor]# | Deallocate the managed memory, if any, without invoking any other destructors. | xref:BloombergLP/bslma/DeallocateBytesProctor/ptr.adoc[`ptr`] | Return the address of the currently managed memory block, if engaged; otherwise return a null pointer. | xref:BloombergLP/bslma/DeallocateBytesProctor/release.adoc[`release`] | Disengage this allocator and return a pointer to the formerly managed memory block. | xref:BloombergLP/bslma/DeallocateBytesProctor/reset.adoc[`reset`] | Release the managed memory and reset this proctor to manage the specified `nbytes` bytes at the specified `p` address. Optionally specify the `alignment` used to allocate `p`. If `p` is null, then the proctor is disengaged (manages no memory). The behavior is undefined unless `p` is null or was allocated with a size of `nbytes` and alignment of `alignment` from the same allocator used to construct this proctor. Note that the previously managed block is not deallocated. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#