1. In a reference-counted environment, an NSAutoreleasePool contains objects that have received autorelease message. When the pool drained, it sends release message to each of the objects.
2. The Application Kit creates an autorelease pool for [color=darkred]main thread [/color] at the beginning of every cycle of the event loop. We can create "local" autorelease pool.
3. Can [color=darkred]NOT[/color] retain or autorelease an autorelease pool.
4. Should always drain an autorelease pool in the same context that it was created.
4. Each thread maintains its own [color=darkred]stack[/color] of NSAutoreleasePool objects. When a thread terminates, it automatically drains all of the autorelease pools associated with itself.
2. The Application Kit creates an autorelease pool for [color=darkred]main thread [/color] at the beginning of every cycle of the event loop. We can create "local" autorelease pool.
3. Can [color=darkred]NOT[/color] retain or autorelease an autorelease pool.
4. Should always drain an autorelease pool in the same context that it was created.
4. Each thread maintains its own [color=darkred]stack[/color] of NSAutoreleasePool objects. When a thread terminates, it automatically drains all of the autorelease pools associated with itself.