Contents

withObjects

Allocates an OSArray object with given members and preallocated capacity.

Declaration

static OSArrayPtr withObjects(const OSObject **values, uint32_t count, uint32_t capacity);

Parameters

  • values:

    C-array pointer to members for the array.

  • count:

    Count of members being added to the array.

  • capacity:

    Count of allocated capacity for members in array.

Return Value

NULL on failure, otherwise the allocated OSArray with reference count 1 to be released by the caller.

See Also

Creating an Array