Contents

dispatch_data_create_concat

Returns a new dispatch data object consisting of the concatenated data from two other data objects.

Declaration

extern dispatch_data_t dispatch_data_create_concat(dispatch_data_t data1, dispatch_data_t data2);

Parameters

  • data1:

    The first data object to include. The memory from this object is placed at the beginning of the new data object’s memory region.

  • data2:

    The second data object to include. The memory from this object is added to the end of the memory from data1.

Return Value

A new dispatch data object containing the concatenated memory.

Discussion

After calling this function, it is safe to release either of the objects in data1 or data2. However, be aware that the memory from those objects may not be deallocated if the newly created dispatch data object references it, as opposed to copies it.

See Also

Creating a Dispatch Data Object