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

Create an auto raw deleter to manage an array of objects&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
AutoRawDeleter(
    TYPE** origin,
    ALLOCATOR* allocator,
    int length = 0);
----

== Description

Create an auto raw deleter to manage an array of objects at the specified `origin`, and that uses the specified `allocator` to delete the sequence of objects managed by this range proctor (if not released &hyphen;&hyphen; see `release`) upon destruction&period; Optionally specify `length` to define its range, which by default is empty (i&period;e&period;, `length &equals; 0`)&period; The sequence of objects may extend in either direction from `origin`&period; A positive `length` represents the sequence of objects starting at `origin` and extending &quot;up&quot; to `length` (_not_ including the object at the index position `origin &plus; length`)&period; A negative `length` represents the sequence of objects starting at one position below `origin` and extending &quot;down&quot; to the absolute value of `length` (including the object at index position `origin &plus; length`)&period; If `length` is 0, then this range proctor manages no objects&period; If `origin` is non&hyphen;zero, all objects within the proctored range (if any) must be constructed using memory supplied by `allocator`&period; The behavior is undefined unless `allocator` is non&hyphen;zero, and, if `origin` is 0, &apos;length is also 0&period; Note that when `length` is non&hyphen;positive, the object at the origin is _not_ managed by this range proctor&period; For example, if `origin` is at the index position 2, a `length` of 2 signifies that the objects at positions 2 and 3 are managed, whereas a `length` of &hyphen;2 signifies that the objects at positions 0 and 1 are managed&colon; &grave; length &equals; &hyphen;2 length &equals; 2 &verbar;&lt;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&gt;&verbar; &verbar;&lt;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&gt;&verbar; &lowbar;&lowbar;&lowbar; &lowbar;&lowbar;&lowbar; &lowbar;&lowbar;&lowbar; &lowbar;&lowbar;&lowbar; &lowbar;&lowbar;&lowbar; &lowbar;&lowbar;&lowbar; &lowbar;&lowbar;&lowbar; &lowbar;&lowbar;&lowbar; &lowbar;&lowbar;&lowbar; &lowbar;&lowbar;&lowbar; &verbar; 0 &verbar; 1 &verbar; 2 &verbar; 3 &verbar; 4 &verbar; &verbar; 0 &verbar; 1 &verbar; 2 &verbar; 3 &verbar; 4 &verbar; `#&equals;&circ;#&equals;^&equals;&equals;&equals;^#&equals;&circ;#&equals;&apos; `#&equals;&circ;#&equals;^&equals;&equals;&equals;^#&equals;&circ;#&equals;&apos; &circ;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen; origin &circ;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen; origin &grave;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *origin*
| The address of the origin object pointer&period;
| *allocator*
| The allocator used to delete managed objects&period;
| *length*
| The signed length of the managed object sequence&period;
|===


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