On Oct 16, 2013, at 12:31 AM, Charles Srstka <[email protected]> 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     [email protected]     Runtime Wrangler



_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to