Package apple.foundation.enums
Class NSPointerFunctionsOptions
- java.lang.Object
-
- apple.foundation.enums.NSPointerFunctionsOptions
-
public final class NSPointerFunctionsOptions extends java.lang.ObjectNSPointerFunctions This object defines callout functions appropriate for managing a pointer reference held somewhere else. Used by NSHashTable, NSMapTable, and NSPointerArray, this object defines the acquision and retention behavior for the pointers provided to these collection objects. The functions are separated into two clusters - those that define "personality", such as object or cString, and those that describe memory management issues such as a memory deallocation function. Common personalities and memory manager selections are provided as enumerations, and further customization is provided by methods such that the composition of the actual list of functions is done opaquely such that they can be extended in the future. The pointer collections copy NSPointerFunctions objects on input and output, and so NSPointerFunctions is not usefully subclassed.
-
-
Field Summary
Fields Modifier and Type Field Description static longCopyInthe memory acquire function will be asked to allocate and copy items on inputstatic longCStringPersonalityuse a string hash and strcmp, description assumes UTF-8 contents; recommended for UTF-8 (or ASCII, which is a subset) only cstringsstatic longIntegerPersonalityuse unshifted value as hash & equalitystatic longMachVirtualMemorystatic longMallocMemoryfree() will be called on removal, calloc on copyInstatic longObjectPersonalityuse -hash and -isEqual, object descriptionstatic longObjectPointerPersonalityuse shifted pointer hash and direct equality, object descriptionstatic longOpaqueMemorystatic longOpaquePersonalityuse shifted pointer hash and direct equalitystatic longStrongMemoryuse strong write-barrier to backing store; use GC memory on copyInstatic longStructPersonalityuse a memory hash and memcmp (using size function you must set)static longWeakMemoryuses weak read and write barriers appropriate for ARC
-
-
-
Field Detail
-
StrongMemory
public static final long StrongMemory
use strong write-barrier to backing store; use GC memory on copyIn- See Also:
- Constant Field Values
-
OpaqueMemory
public static final long OpaqueMemory
- See Also:
- Constant Field Values
-
MallocMemory
public static final long MallocMemory
free() will be called on removal, calloc on copyIn- See Also:
- Constant Field Values
-
MachVirtualMemory
public static final long MachVirtualMemory
- See Also:
- Constant Field Values
-
WeakMemory
public static final long WeakMemory
uses weak read and write barriers appropriate for ARC- See Also:
- Constant Field Values
-
ObjectPersonality
public static final long ObjectPersonality
use -hash and -isEqual, object description- See Also:
- Constant Field Values
-
OpaquePersonality
public static final long OpaquePersonality
use shifted pointer hash and direct equality- See Also:
- Constant Field Values
-
ObjectPointerPersonality
public static final long ObjectPointerPersonality
use shifted pointer hash and direct equality, object description- See Also:
- Constant Field Values
-
CStringPersonality
public static final long CStringPersonality
use a string hash and strcmp, description assumes UTF-8 contents; recommended for UTF-8 (or ASCII, which is a subset) only cstrings- See Also:
- Constant Field Values
-
StructPersonality
public static final long StructPersonality
use a memory hash and memcmp (using size function you must set)- See Also:
- Constant Field Values
-
IntegerPersonality
public static final long IntegerPersonality
use unshifted value as hash & equality- See Also:
- Constant Field Values
-
CopyIn
public static final long CopyIn
the memory acquire function will be asked to allocate and copy items on input- See Also:
- Constant Field Values
-
-