• 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
is a repetitive use of imageNamed: bad?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

is a repetitive use of imageNamed: bad?


  • Subject: is a repetitive use of imageNamed: bad?
  • From: Olivier Lanctôt <email@hidden>
  • Date: Thu, 24 Nov 2005 12:25:29 -0500

Hi list,

I want to ask a simple question.

Imagine a view that always draws a background, which is a NSImage.

Is it bad to always invoke imageNamed: every time -drawRect: is called?
Yes, it's one more objc message, but is there internal caching that
prevents NSImage from accessing the HD again and again?

Is it better to declare the image as an ivar or a static on the file
and init it at -init?

Thanks!

--
Olivier
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: is a repetitive use of imageNamed: bad?
      • From: Ryan Britton <email@hidden>
  • Prev by Date: transparent window and transparent button problems
  • Next by Date: Re: is a repetitive use of imageNamed: bad?
  • Previous by thread: Re: transparent window and transparent button problems
  • Next by thread: Re: is a repetitive use of imageNamed: bad?
  • Index(es):
    • Date
    • Thread