Contents

copyCollection

Creates a deep copy of an array and its child collections.

Declaration

OSCollection * copyCollection(
 OSDictionary *cycleDict = 0);

Parameters

  • cycleDict:

    A dictionary of all of the collections that have been copied so far, which is used to track circular references. To start the copy at the top level, pass NULL.

Return Value

The newly copied array, with a retain count of 1, or NULL if there is insufficient memory to do the copy.

Overview

The receiving array, and any collections it contains, recursively, are copied. Objects that are not derived from OSCollection are retained rather than copied.

See Also

Miscellaneous