Re: ARC and Singletons
Re: ARC and Singletons
- Subject: Re: ARC and Singletons
- From: Karl Goiser <email@hidden>
- Date: Tue, 02 Aug 2011 12:14:35 +1000
Wow, class methods finally get the tick of approval! Only 30+ years after being specified in the Smalltalk standard..
Forget about singletons: they are just a workaround for not having class methods/variables.
Each class is a single object that exists for the life of the application therefore it is, by definition a singleton - and you get it for free!
You don’t need to keep and manage variables pointing to the class because you already have it when you send a message to a class method.
Karl
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden