On Aug 1, 2011, at 10:12 AM, Kyle Sluder wrote:

> On Mon, Aug 1, 2011 at 9:05 AM, Dave Zarzycki <[email protected]> wrote:
>> The simplest and most ARC friendly way to implement the singleton pattern is 
>> to switch from instance methods to class methods – because the class itself 
>> is by definition a singleton. In other words:
> 
> Eek, this might be conceptually simple but it's a ton of work and
> giant step backwards in API design. Remember when -[NSFileManager
> alloc] became useful in 10.5?


There's nothing wrong with using the +sharedInstance approach either, just 
remove all the shenanigans that were defined to ensure that there was only one 
instance. In the majority of cases it was likely overkill and potentially 
masking memory management bugs.
--
David Duncan

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to