« GREEN LANTERN: FIRST FLIGHT MOVIE - Official Site | Main | Matt Legend Gemmell - What have you tried? »

March 6, 2009

Memory Management Programming Guide for Cocoa: Autorelease Pools

I've been reading both that "an autorelease pool is created around each event cycle" and that it isn't. I finally found the answer "from the horse's mouth" as it were:

http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmAutoreleasePools.html

The Application Kit automatically creates a pool at the beginning of an event cycle (or event-loop iteration), such as a mouse down event, and releases it at the end, so your code normally does not have to worry about them. There are three cases, though, where you might create and destroy your own autorelease pools:


So - as long as you're a UIKit / AppKit application, you're all set...

Another very useful article: http://memo.tv/memory_management_with_objective_c_cocoa_iphone

Posted by aland at March 6, 2009 2:51 PM

Trackback Pings

TrackBack URL for this entry:
http://www.aland.us/mt/mt-tb.cgi/244

Comments

Post a comment




Remember Me?