Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Proper way to create a singleton without @synchronized ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proper way to create a singleton without @synchronized ?



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

References: 
 >Proper way to create a singleton without @synchronized ? (From: WT <email@hidden>)
 >Re: Proper way to create a singleton without @synchronized ? (From: Scott Ribe <email@hidden>)
 >Re: Proper way to create a singleton without @synchronized ? (From: WT <email@hidden>)
 >Re: Proper way to create a singleton without @synchronized ? (From: Scott Ribe <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.