On Fri, Aug 8, 2008 at 9:02 AM, Matt Neuburg <[EMAIL PROTECTED]> wrote:
> Wrap each call to setApplicationIconImage in an autorelease pool creation
> and release, like this:
>
>        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
>        [NSApp setApplicationIconImage: whatever];
>        [pool release];

Okay, sorry for jumping in late, but I don't understand how this would
solve the problem.  Since we're talking about NSApplication, AppKit
has already created an NSAutoreleasePool, so it's not like
-setApplicationIconImage: is autoreleasing an object when there's no
autorelease pool stack.  Therefore, regardless of whether it's an
AppKit autorelease pool or your own autorelease pool, any autoreleased
object will still only get one -release message.  Creating your own
autorelease pool should only make it happen "now" instead of "later".

--Kyle Sluder
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to