Re: [solved] Re: NSImage leaks open file in 10.8.2?
Re: [solved] Re: NSImage leaks open file in 10.8.2?
- Subject: Re: [solved] Re: NSImage leaks open file in 10.8.2?
- From: Kyle Sluder <email@hidden>
- Date: Fri, 15 Feb 2013 09:38:48 -0800
On Fri, Feb 15, 2013, at 09:30 AM, norbert wrote:
> Thanks a lot for your comments. I have tried to set
> setCacheMode:NSImageCacheNever, but that still left the file open.
>
> But I have changed my code to use this now:
>
> NSImage *result = [[NSImage alloc] initByReferencingFile:[[NSBundle mainBundle] pathForResource:[theName stringByDeletingPathExtension] ofType:@"png"]];
> [result autorelease];
This will not deal with @2x images correctly, though that might not be
an issue for you.
>
> And this works!!! No more image files left open. That is definitely a bug
> in Mac OS X 10.8.2, I can't believe this is intended behavior…
If you're certain of this, you should definitely file a Radar with a
small demo project that reproduces the issue. It would also be nice if
you could share that demo project with us.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden