• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [solved] Re: NSImage leaks open file in 10.8.2?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSImage leaks open file in 10.8.2? (From: norbert <email@hidden>)
 >[solved] Re: NSImage leaks open file in 10.8.2? (From: norbert <email@hidden>)

  • Prev by Date: [solved] Re: NSImage leaks open file in 10.8.2?
  • Next by Date: Custom control with 4 vertical sliders
  • Previous by thread: [solved] Re: NSImage leaks open file in 10.8.2?
  • Next by thread: Pointer was being free was not allocated
  • Index(es):
    • Date
    • Thread