NSZone

Legacy memory management structure in mulle-objc that provides zone-based memory allocation compatibility.

Functions

Zone Operations

Memory Management

Object Allocation

Usage Example

// 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);

Important Notes

  1. Compatibility
  2. Memory Management
  3. Modern Code
  4. Best Practices