A collection similar to a set, but with broader range of available memory semantics.
An
NSHashTable
is 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. AnNSHashTable
can 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 appropriateNSPointerFunctionsOptions
or configure or use anNSPointerFunctions
object itself for initialization.