Enumeration

NSPointerFunctionsOptions

Defines the memory and personality options for an NSPointerFunctions object.

Declaration

typedef enum NSPointerFunctionsOptions : NSUInteger {
    ...
} NSPointerFunctionsOptions;

Overview

When specifying a value, you can use only one of the options listed in Memory Options, only one of the options listed in Personality Options, and any number of other options.

Topics

Memory Options

These options are mutually exclusive.

NSPointerFunctionsMallocMemory

Use free() on removal, calloc() on copy in.

NSPointerFunctionsOpaqueMemory

Take no action when pointers are deleted.

NSPointerFunctionsStrongMemory

Use strong write-barriers to backing store; use garbage-collected memory on copy-in.

NSPointerFunctionsWeakMemory

Uses weak read and write barriers appropriate for ARC or GC. Using NSPointerFunctionsWeakMemory object references will turn to NULL on last release.

NSPointerFunctionsZeroingWeakMemory

Use weak read and write barriers; use garbage-collected memory on copyIn.

Deprecated

Personality Options

These options are mutually exclusive.

NSPointerFunctionsCStringPersonality

Use a string hash and strcmp; C-string '%s' style description.

NSPointerFunctionsIntegerPersonality

Use unshifted value as hash and equality.

NSPointerFunctionsObjectPersonality

Use hash and isEqual methods for hashing and equality comparisons, use the description method for a description.

NSPointerFunctionsObjectPointerPersonality

Use shifted pointer for the hash value and direct comparison to determine equality; use the description method for a description.

NSPointerFunctionsOpaquePersonality

Use shifted pointer for the hash value and direct comparison to determine equality.

NSPointerFunctionsStructPersonality

Use a memory hash and memcmp (using a size function that you must set—see sizeFunction).

Copy Option

NSPointerFunctionsCopyIn

Use the memory acquire function to allocate and copy items on input (see acquireFunction).