[#BloombergLP-bdld-ManagedDatum-2constructor-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdld.adoc[bdld]::xref:BloombergLP/bdld/ManagedDatum.adoc[ManagedDatum]::ManagedDatum
:relfileprefix: ../../../
:mrdocs:

Create a `ManagedDatum` object that assumes ownership of the specified `datum`&period;

== Synopsis

Declared in `&lt;bdld&lowbar;manageddatum&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
ManagedDatum(
    xref:BloombergLP/bdld/Datum.adoc[Datum] const& datum,
    xref:BloombergLP/bdld/ManagedDatum/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type());
----

== Description

Optionally specify an `allocator` (e&period;g&period;, the address of a `bslma&colon;&colon;Allocator` object) to supply memory&semi; otherwise, the default allocator is used&period; The behavior is undefined unless `datum` was allocated using the indicated allocator and is not subsequently destroyed externally using `Datum&colon;&colon;destroy`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *datum*
| Datum object whose ownership is assumed
| *allocator*
| allocator used to supply memory
|===


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