Creates an immutable CFSet object containing supplied values.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The allocator to use to to allocate memory for the new set and its storage for values. Pass
kto use the current default allocator.
A C array of the pointer-sized values to be in the new set. This parameter may be
numparameter is 0. The C array is not changed or freed by this function.
valuesmust be a pointer to a C array of at least
The number of values to copy from the
valuesC array in the new set.
A pointer to a
CFSetstructure initialized with the callbacks to use to retain, release, describe, and compare values in the collection. A copy of the contents of the callbacks structure is made, so that a pointer to a structure on the stack can be passed in or can be reused for multiple collection creations.
This value may be
NULL, which is treated as a valid structure of version
0with all fields
NULL. If the collection contains only CFType objects, then pass
kto use the default callback functions.
CFType Set Call Backs
A new immutable set, or
NULL if there was a problem creating the object. Ownership follows the The Create Rule.
If any value put into the collection is not one understood by one of the callback functions, the behavior when that callback function is used is undefined.