NSAutoreleasePool. When is it appropriate to create a new autorelease pool?
On iOS/CocoaTouch I often see code that creates a new instance of NSAutoreleasePool within a method. I recently saw one within an NSOperation. What are the ground rules for setting up a new instance of NSAutoreleasePool? Why is this preferable to simply relying on the pre-existing release pool created in main.m? Thanks, Doug You can use a new autorelease pool whenever you want, but it is not always beneficial. It is required whenever you start a new thread or objects autoreleased in that thread will be leaked. It is also common to create new autorelease pools in a method where you create and