Re: Iterating NSSet (was Re: My new framwork)
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.