A collection similar to a set, but with broader range of available memory semantics.
An
NSHashTableis modeled after a set, although, because of its options, is not a set because it can behave differently (for example, if pointer equality is specified two isEqual strings will both be entered). The major option is to provide for "weak" references that are removed automatically, but at some indefinite point in the future. AnNSHashTablecan also be configured to operate on arbitrary pointers and not just objects. We recommend the C function API for "void *" access. To configure for pointer use, consult and choose the appropriateNSPointerFunctionsOptionsor configure or use anNSPointerFunctionsobject itself for initialization.