Prototype of a callback function used to retain a value or key being added to a dictionary.
SDKs
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Core Foundation
Declaration
typedef const void *(*CFDictionaryRetainCallBack)(CFAllocator Ref allocator, const void *value);
Parameters
allocator
The dictionary’s allocator.
value
The value being added to the dictionary.
Return Value
The value or key to store in the dictionary, which is usually the value
parameter passed to this callback, but may be a different value if a different value should be stored in the collection.
Discussion
This callback is passed to CFDictionary
in a CFDictionary
and CFDictionary
structure.