[#BloombergLP-bdld-Datum-copyBinary]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdld.adoc[bdld]::xref:BloombergLP/bdld/Datum.adoc[Datum]::copyBinary
:relfileprefix: ../../../
:mrdocs:

Return a datum owning a copy of the specified binary `value`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdld/Datum.adoc[Datum]
copyBinary(
    void const* value,
    xref:BloombergLP/bdld/Datum/SizeType.adoc[SizeType] size,
    xref:BloombergLP/bdld/Datum/AllocatorType.adoc[AllocatorType] const& allocator);
----

== Description

Return, by value, a datum referring to the copy of the specified `value` of the specified `size`, using the specified `allocator` to supply memory (if needed)&period; The behavior is undefined unless &grave;size &lt;&equals; UINT&lowbar;MAX&grave;&period; Note that the copy of the binary data is owned and will be freed if `Datum&colon;&colon;destroy` is called on the returned object&period;

== Return Value

a datum owning a copy of the specified binary `value`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| binary data to copy
| *size*
| size of `value` in bytes
| *allocator*
| memory allocator to use
|===


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