• 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: Is Apple's singleton sample code correct?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is Apple's singleton sample code correct?


  • Subject: Re: Is Apple's singleton sample code correct?
  • From: glenn andreas <email@hidden>
  • Date: Tue, 29 Nov 2005 23:14:19 -0600


On Nov 29, 2005, at 9:37 PM, Jeff Laing wrote:
Frankly, I'm a bit confused as to why people think that singletons are going
to be retain'd anyway - I can't think of any scenario where *I* would do
such a thing, but I'm not an expert by any means. Can someone give a real
example where my application code might want to *retain* a singleton, given
that you can always get back to it via the +sharedInstance method anyway, so
holding on to the pointer seems like a waste.


myColor = [[NSColor whiteColor] retain];

Glenn Andreas                      email@hidden
 <http://www.gandreas.com/> wicked fun!
quadrium | build, mutate, evolve | images, textures, backgrounds, art

_______________________________________________
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


References: 
 >RE: Is Apple's singleton sample code correct? (From: Jeff Laing <email@hidden>)

  • Prev by Date: Re: Coredata and faulting
  • Next by Date: Re: Embedding Custom NSView in an NSWindow
  • Previous by thread: RE: Is Apple's singleton sample code correct?
  • Next by thread: Re: Is Apple's singleton sample code correct?
  • Index(es):
    • Date
    • Thread