Legacy memory management structure in mulle-objc that provides zone-based memory allocation compatibility.
NSCreateZone
- Creates new zone (returns NULL)NSRecycleZone
- Frees zone (no-op)NSDefaultMallocZone
- Gets default zone (returns NULL)NSZoneMalloc
- Allocates memory in zoneNSZoneCalloc
- Allocates zeroed memoryNSZoneRealloc
- Reallocates memoryNSZoneFree
- Frees memoryNSAllocateObject
- Allocates object in zoneNSReallocateObject
- Reallocates objectNSDeallocateObject
- Deallocates object// Create zone (returns NULL)
NSZone *zone = NSCreateZone(1024, 128, YES);
// Allocate memory in zone
void *memory = NSZoneMalloc(zone, size);
// Reallocate memory in zone
void *newMemory = NSZoneRealloc(zone, memory, newSize);
// Free memory in zone
NSZoneFree(zone, memory);
// Object allocation
id object = NSAllocateObject(class, extraBytes, zone);