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: Thu, 08 Sep 2011 09:05:53 +0200
I see. I should have not argued with immutability.
> [[NSBundle mainBundle] loadNibNamed:@"ComplexTableViewCell" owner:self options:nil];
> cell = [[self.loadedCell retain] autorelease];
> self.loadedCell = nil;
Here you assume that loadNibNamed:owner:options has finished writing
to self.loadedCell so synchronization wise the write to the outlet is
irrelevant. In fact it most likely will happen in the main thread.
...plus you can use a different NIB loading approach that does not
change an existing outlet.
> Not to mention that retained IB outlets also need to be nil'ed out when the view is unloaded...
Again. Since no one else is writing but you this is not relevant for
synchronization.
The whole point is after the NIB loading there is just no second party
(AppKit) writing concurrently.
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