• 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: David Gimeno Gost <email@hidden>
  • Date: Sat, 26 Nov 2005 22:44:48 +0100

j o a r <email@hidden> wrote:

* Why spend all that time on overriding retain / release, et.c.?

Well, the answer to this question and the question itself are exactly the reasons this thread has been going on for so long. :-)


What I'm trying to demonstrate is precisely that all this overhead comes from a too restrictive conception of what an implementation of the singleton pattern should do, and that by not imposing any unnecessary lifetime requirements to the singleton in the design of the class one can come up with an implementation that can satisfy any lifetime requirements without needing all those methods to be overridden at all.

If you're not a framework developer, I would say that it's mostly a
complete waste of time.

Actually, I would go as far as to say that all this overhead is a waste of time even if you're a framework developer.


Regards.

_______________________________________________
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


  • Prev by Date: Re: CVS: Only the linking fails, but how do we overcome this?
  • Next by Date: Update NSMenu / NSMenuItem while they are displayed
  • 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