[#BloombergLP-bdlma-LocalBufferedObject]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::LocalBufferedObject
:relfileprefix: ../../
:mrdocs:

Holds a `t&lowbar;TYPE` object with a local sequential allocator arena&period;

== Synopsis

Declared in `&lt;bdlma&lowbar;localbufferedobject&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;TYPE,
    std::size&lowbar;t t&lowbar;BUFFER&lowbar;SIZE = 1024,
    bool t&lowbar;DISABLE&lowbar;DESTRUCTION = false&gt;
class LocalBufferedObject;
----

== Description

This `class` contains an object of type `t&lowbar;TYPE` and a local sequential allocator with an arena size of `t&lowbar;BUFFER&lowbar;SIZE`, from which the `t&lowbar;TYPE` object allocates memory, in a single object&period; The `t&lowbar;DISABLE&lowbar;DESTRUCTION` template parameter can be used to prevent this `class` from calling `&#126;t&lowbar;TYPE()` in cases where it is known that `t&lowbar;TYPE` manages no resources other than memory, since the memory will be adequately managed by the local sequential allocator&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlma/LocalBufferedObject/allocator_type.adoc[`allocator&lowbar;type`] 
| Allocator type used by this object&period;
| xref:BloombergLP/bdlma/LocalBufferedObject/value_type.adoc[`value&lowbar;type`] 
| Type of the locally buffered object&period;
|===


== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlma/LocalBufferedObject/_04enum.adoc[`Unnamed enum`] 
| The `size` template parameter to `LocalAllocator` takes an `int`, not `size&lowbar;t`&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlma/LocalBufferedObject/2constructor-0f6.adoc[`LocalBufferedObject`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlma/LocalBufferedObject/2destructor.adoc[`&#126;LocalBufferedObject`] [.small]#[destructor]#
| Destroy this object and free any memory it uses&period;
| xref:BloombergLP/bdlma/LocalBufferedObject/operator_assign.adoc[`operator&equals;`] 
| Assign the object held by this container to the specified `value`&period;
| xref:BloombergLP/bdlma/LocalBufferedObject/emplace-0f.adoc[`emplace`] 
| `emplace` overloads
| xref:BloombergLP/bdlma/LocalBufferedObject/get_allocator.adoc[`get&lowbar;allocator`] 
| Return the allocator passed at construction&period;
| xref:BloombergLP/bdlma/LocalBufferedObject/operator_star-03.adoc[`operator&ast;`] 
| Dereference operators
| xref:BloombergLP/bdlma/LocalBufferedObject/operator_ptr-03.adoc[`operator&hyphen;&gt;`] 
| Member access operators
| xref:BloombergLP/bdlma/LocalBufferedObject/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;LocalBufferedObject, UsesAllocatorArgT&gt;`] 
| Declare that this type uses `bslmf&colon;&colon;UsesAllocatorArgT`&period;
|===



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