Contents

withData(const OSData *)

Creates and initializes an instance of OSData with contents copied from another OSData object.

Declaration

static OSData * withData(
 const OSData *inData);

Parameters

  • inData:

    An OSData object that provides the initial data.

Return Value

An instance of OSData containing a copy of the data in inData, with a reference count of 1; NULL on failure.

Overview

The new OSData object will grow as needed to accommodate more bytes (unlikeCFMutableData, for which a nonzero initial capacity is a hard limit).

See Also

Miscellaneous