Creates a copy of the object.
- macOS 10.7+
- Mac Catalyst 13.0+
The object to copy.
The new object. NULL if the object type does not support copying or if sufficient memory for the copy could not be allocated. Service objects do not support copying.
When called on an array or dictionary, xpc_copy() will perform a deep copy.
The object returned is not necessarily guaranteed to be a new object, and whether it is will depend on the implementation of the object being copied.