Re: nonatomic vs atomic assign/retain
Re: nonatomic vs atomic assign/retain
- Subject: Re: nonatomic vs atomic assign/retain
- From: Torsten Curdt <email@hidden>
- Date: Wed, 07 Sep 2011 09:33:48 +0200
>> Given that access to the outlets
>> is only valid after a certain safe point (awakeFromNib) one could
>> consider outlets final/immutable and therefor synchronization should
>> not be required.
>
> You can change outlets at any time after that. Consider changing the delegate for some reason, or swapping views in & out, and so on.
I don't see how changing delegates or swapping views in & out is
related here. It's something you apply to an object. An IBOutlet is a
reference to an object into a NIB. Synchronized access to the
reference does not say anything about the synchronization of the
properties (like a delegate) of the object it is pointing to. So it
could be the access to the delegate is atomic but that does not mean
the outlet to the object needs to be atomic.
So far I have never had to set an outlet itself in code myself. Do
people really do this?
cheers,
Torsten
_______________________________________________
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