On Oct 16, 2013, at 12:31 AM, Charles Srstka <cocoa...@charlessoft.com> wrote:
> I ask because if you're not using NSApplication's run loop, you won't get an 
> automatic release pool, which would explain what you were seeing. 

On sufficiently-recent OS versions, the runtime will silently push an 
autorelease pool if you autorelease without one. This can lead to unrecognized 
leaks if this happens on a long-lived thread. On some of those OS versions you 
can run with environment variable OBJC_DEBUG_MISSING_POOLS=YES to get a log 
message when this happens.

(History: Some OS version implemented this automatic pool behavior by accident. 
We chose to formally support it rather than take it away again and risk crashes 
in shipping apps.)


-- 
Greg Parker     gpar...@apple.com     Runtime Wrangler



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to