Deallocate any memory that was previously allocated within the specified value using the specified allocator. If the value contains an adopted array of datums, destroy is called on each array element. If the value contains an adopted map of datums, destroy is called on each map element. The behavior is undefined unless all dynamically allocated memory owned by value was allocated using allocator, and has not previously been released by a call to destroy, either on this object, or on another object referring to same contents as this object (i.e., only one copy of a Datum object can be destroyed). The behavior is also undefined if value has an uninitialized or partially initialized array or map (created using createUninitializedArray, createUninitializedMap or createUninitializeMapOwningKeys). Note that after this operation completes, value is left in an uninitialized state, and must be assigned a new value before being accessed again.
Synopsis
Declared in <bdld_datum.h>
static
void
destroy(
Datum const& value,
AllocatorType const& allocator);
Created with MrDocs