Re: Best practices with singletons
Re: Best practices with singletons
- Subject: Re: Best practices with singletons
- From: Seth Willits <email@hidden>
- Date: Sun, 08 Jun 2014 12:11:38 -0700
The practical answer in short is: Just always access through +sharedInstance, no need to pre-initialize, and only use it on the main thread.
This is one of those threads that will easily become a stupidly long debate that's been had a dozen times before. If you're interested in all of the intricate discussion about thread safety and how singletons are the spawn of satan, go search the archives and Google.
--
Seth Willits
_______________________________________________
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