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

Range proctor that deletes a contiguous sequence of objects on destruction&period;

== Synopsis

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

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

== Description

This class implements a range proctor that, unless its `release` method has previously been invoked, automatically deletes the contiguous sequence of managed objects upon destruction by iterating on each (managed) object, first invoking the object&apos;s destructor, and then free memory by invoking the `deallocate` method of an allocator (or pool) of parameterized `ALLOCATOR` type supplied to it at construction&period; The sequence of managed objects of parameterized `TYPE` must have been created using memory provided by this allocator (or pool), which must remain valid throughout the lifetime of this range proctor&period; Note that when the length of this object is non&hyphen;zero, it must refer to a non&hyphen;null array of objects&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslma/AutoRawDeleter/2constructor.adoc[`AutoRawDeleter`]         [.small]#[constructor]#
| Create an auto raw deleter to manage an array of objects&period;
| xref:BloombergLP/bslma/AutoRawDeleter/2destructor.adoc[`&#126;AutoRawDeleter`] [.small]#[destructor]#
| Destroy this range proctor and delete its managed objects&period;
| xref:BloombergLP/bslma/AutoRawDeleter/length.adoc[`length`] 
| Return the (signed) length of the sequence of objects managed by this range proctor&period;
| xref:BloombergLP/bslma/AutoRawDeleter/operator_inc.adoc[`operator&plus;&plus;`] 
| Increase by one the (signed) length of the managed sequence&period;
| xref:BloombergLP/bslma/AutoRawDeleter/operator_dec.adoc[`operator&hyphen;&hyphen;`] 
| Decrease by one the (signed) length of the managed sequence&period;
| xref:BloombergLP/bslma/AutoRawDeleter/release.adoc[`release`] 
| Release from management the sequence of objects currently managed&period;
| xref:BloombergLP/bslma/AutoRawDeleter/reset.adoc[`reset`] 
| Set the origin of the sequence of objects managed by this proctor&period;
| xref:BloombergLP/bslma/AutoRawDeleter/setLength.adoc[`setLength`] 
| Set the (signed) length of the managed object sequence&period;
|===



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