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: Allan Odgaard <email@hidden>
- Date: Sun, 7 Mar 2004 22:01:11 +0100
On 6. Mar 2004, at 0:50, Glen Low wrote:
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.
In fact, if I do:
NSImage* img = [NSImage imageNamed:imageName];
[img setFlipped:YES];
[...much later...]
printf("%d\n", [[NSImage imageNamed:imageName] isFlipped]);
It will print "1" -- so clearly there is a cache, and not just on the
bitmap-level, on the actual object level (but that was already
established based on the pointer comparison).
_______________________________________________
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.