Re: Is Apple's singleton sample code correct?
Re: Is Apple's singleton sample code correct?
- Subject: Re: Is Apple's singleton sample code correct?
- From: Scott Anguish <email@hidden>
- Date: Thu, 1 Dec 2005 00:40:46 -0500
On Nov 30, 2005, at 11:14 PM, David Gimeno Gost wrote:
Sorry for being so dense, but I think I still don't get it:
MySingleton* herewegoagain = [MySingleton sharedInstance];
[herewegoagain release]; // <- Will -dealloc be invoked or not?
Incidentally, aside from this ongoing whatever it is about
singletons, that code is incorrect.
If you don't alloc/init or retain it, you have no business releasing
it.
--
"William Cheeseman ... is said not to be a doofus in real life." -
Roger Ebert, Chicago Sun-Times Online
Scott Anguish
email@hidden
_______________________________________________
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