Re: Proper way to create a singleton without @synchronized ?
Re: Proper way to create a singleton without @synchronized ?
- Subject: Re: Proper way to create a singleton without @synchronized ?
- From: WT <email@hidden>
- Date: Sun, 17 Apr 2011 16:37:24 -0300
On Apr 17, 2011, at 4:28 PM, Scott Ribe wrote:
> On Apr 17, 2011, at 12:43 PM, WT wrote:
>
>> That's not what I keep reading/hearing. Apple's made a big push for GCD in WWDC 2010, even on iOS devices.
>
> Yeah, for actually performing tasks on background threads, which is not what you're doing here.
I am, insofar as my singletons are thread-safe.
>> I think that's an oversimplification of how things get used. See my reply to Kyle's last message for some examples of how/why I use singletons.
>
> I saw that message and was responding to it. Why exactly do these classes of yours need enforced singletons rather than single instances instantiated at app initialization? What do you gain?
I think I've explained my reasons. Perhaps they're not other people's reasons, perhaps they're not even good reasons. If for no other reason, consider this a learning experience for me, as you pointed out earlier.
WT
_______________________________________________
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