• 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: Iterating NSSet (was Re: My new framwork)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Iterating NSSet (was Re: My new framwork)


  • Subject: Re: Iterating NSSet (was Re: My new framwork)
  • From: Glen Low <email@hidden>
  • Date: Sat, 6 Mar 2004 07:50:16 +0800

Allan:

On 05/03/2004, at 8:29 AM, email@hidden wrote:

On a related note, does NSImage cache the decoded image returned from
imageNamed:? I can see that I get the same pointer back, even when I do
not retain the result, but I'd rather not rely on caching, if not said
so in the docs (but would love to get rid of the 10+ ivars for all the
small images used by my custom view plus all the release methods in
dealloc).

NSImage does itself create an internal cache for some image types e.g. PDF. If you disable the cache for PDF you generally get better performance, probably less memory usage and it won't crap out at large sizes. The method is: setCacheMode:

If you get back the same image pointer all the time, the system must be caching it, perhaps against a dictionary of names. It should be safe to call imageNamed: whenever you need the image, rather than once when you awakeFromNib: or init: and retain for future use.

Cheers, Glen Low


---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Iterating NSSet (was Re: My new framwork)
      • From: Allan Odgaard <email@hidden>
  • Prev by Date: true file modification dates...
  • Next by Date: my app monitoring all files opened?
  • Previous by thread: true file modification dates...
  • Next by thread: Re: Iterating NSSet (was Re: My new framwork)
  • Index(es):
    • Date
    • Thread