NSAutoreleasePool

Manages temporary objects in mulle-objc. Provides automatic memory management through autorelease pools.

Base Class

None (Root Class)

Instance Variables

NSAutoreleasePool   *_owner;     // Parent pool
void                *_storage;    // Object storage
char                _mulleNameUTF8String[48];  // Pool name

Methods

Pool Management

Object Management

Pool Information

Object Queries

Usage Example

// Create pool
NSAutoreleasePool *pool = [NSAutoreleasePool new];

// Use @autoreleasepool block (preferred)
@autoreleasepool {
    id obj = [[NSObject alloc] init];
    [obj autorelease];
}

// Manual pool management
NSAutoreleasePool *pool = [NSAutoreleasePool new];
id obj = [[NSObject alloc] init];
[obj autorelease];
[pool drain];

// Add objects directly
[NSAutoreleasePool addObject:obj];

// Check pool contents
BOOL hasObj = [pool mulleContainsObject:obj];
NSUInteger count = [pool mulleCountObject:obj];

Important Notes

  1. Thread Safety
  2. Memory Management
  3. Implementation Details
  4. Best Practices
  5. Debugging Support