[#BloombergLP-bdlma-LocalBufferedObject] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::LocalBufferedObject :relfileprefix: ../../ :mrdocs: This `class` contains an object of type `t_TYPE` and a local sequential allocator with an arena size of `t_BUFFER_SIZE`, from which the `t_TYPE` object allocates memory, in a single object. The `t_DISABLE_DESTRUCTION` template parameter can be used to prevent this `class` from calling `~t_TYPE()` in cases where it is known that `t_TYPE` manages no resources other than memory, since the memory will be adequately managed by the local sequential allocator. == Synopsis Declared in `<bdlma_localbufferedobject.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_TYPE, std::size_t t_BUFFER_SIZE = 1024, bool t_DISABLE_DESTRUCTION = false> class LocalBufferedObject; ---- == Type Aliases [cols="1"] |=== | Name | xref:BloombergLP/bdlma/LocalBufferedObject/allocator_type.adoc[`allocator_type`] | xref:BloombergLP/bdlma/LocalBufferedObject/value_type.adoc[`value_type`] |=== == 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_t`. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlma/LocalBufferedObject/2constructor-0f6.adoc[`LocalBufferedObject`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlma/LocalBufferedObject/2destructor.adoc[`~LocalBufferedObject`] [.small]#[destructor]# | Destroy this object and free any memory it uses, and if the (template parameter) `t_DISABLE_DESTRUCTION` is `true`, do this _without_ calling the destructor of `value_type` (see `t_DISABLE_DESTRUCTION` template parameter in the component doc). | xref:BloombergLP/bdlma/LocalBufferedObject/operator_assign.adoc[`operator=`] | Assign the object held by this container to the specified `value`. | xref:BloombergLP/bdlma/LocalBufferedObject/emplace-0f.adoc[`emplace`] | `emplace` overloads | xref:BloombergLP/bdlma/LocalBufferedObject/get_allocator.adoc[`get_allocator`] | Return the alloctor passed at construction, used to provide heap memory after the local stack buffer is exhausted. Note that this is not the arena allocator contained in this object. | xref:BloombergLP/bdlma/LocalBufferedObject/operator_star-03.adoc[`operator*`] | Dereference operators | xref:BloombergLP/bdlma/LocalBufferedObject/operator_ptr-03.adoc[`operator‐>`] | Member access operators | xref:BloombergLP/bdlma/LocalBufferedObject/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<LocalBufferedObject, UsesAllocatorArgT>`] | Declare that this type uses `bslmf::UsesAllocatorArgT`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#