• 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: 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.


References: 
 >Re: Iterating NSSet (was Re: My new framwork) (From: Glen Low <email@hidden>)

  • Prev by Date: Using NSView as a template
  • Next by Date: Re: [BUG?] initialFirstResponder killed by Panther?
  • Previous by thread: Re: Iterating NSSet (was Re: My new framwork)
  • Next by thread: my app monitoring all files opened?
  • Index(es):
    • Date
    • Thread