[#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 at the specified `origin`, and that uses the specified `allocator` to delete the sequence of objects managed by this range proctor (if not released ‐‐ see `release`) upon destruction. Optionally specify `length` to define its range, which by default is empty (i.e., `length = 0`). The sequence of objects may extend in either direction from `origin`. A positive `length` represents the sequence of objects starting at `origin` and extending "up" to `length` (_not_ including the object at the index position `origin + length`). A negative `length` represents the sequence of objects starting at one position below `origin` and extending "down" to the absolute value of `length` (including the object at index position `origin + length`). If `length` is 0, then this range proctor manages no objects. If `origin` is non‐zero, all objects within the proctored range (if any) must be constructed using memory supplied by `allocator`. The behavior is undefined unless `allocator` is non‐zero, and, if `origin` is 0, 'length is also 0. Note that when `length` is non‐positive, the object at the origin is _not_ managed by this range proctor. 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 ‐2 signifies that the objects at positions 0 and 1 are managed: ` length = ‐2 length = 2 |<‐‐‐‐‐>| |<‐‐‐‐‐>| ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ | 0 | 1 | 2 | 3 | 4 | | 0 | 1 | 2 | 3 | 4 | `#=ˆ#=^===^#=ˆ#=' `#=ˆ#=^===^#=ˆ#=' ˆ‐‐‐‐‐‐‐‐‐‐‐‐ origin ˆ‐‐‐‐‐‐‐‐‐‐‐‐ origin ` == Synopsis Declared in `<bslma_autorawdeleter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- AutoRawDeleter( TYPE** origin, ALLOCATOR* allocator, int length = 0); ---- == Parameters [cols="1,4"] |=== | Name| Description | *origin* | The address of the origin object pointer. | *allocator* | The allocator used to delete managed objects. | *length* | The signed length of the managed object sequence. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#