Re: Should I retain a variable returned from this accessor?
Re: Should I retain a variable returned from this accessor?
- Subject: Re: Should I retain a variable returned from this accessor?
- From: Negm-Awad Amin <email@hidden>
- Date: Wed, 13 Aug 2008 09:38:57 +0200
Am Di,12.08.2008 um 21:36 schrieb Shawn Erickson:
On Tue, Aug 12, 2008 at 2:12 AM, Negm-Awad Amin <email@hidden
> wrote:
BTW: You can do the same inside a getter to get rid of thread
problems.
Nope it does nothing to solve threading issues ([[blah retain]
autorelease] isn't an atomic operation) you need to protect it with an
critical section of some type. Additionally adding locking at the
level of accessor is often far to granular to be useful to clients of
a class.
-Shawn
Of course you have to do locking additionally. I did not want to say,
that this solves all problems of threading.
Amin Negm-Awad
email@hidden
_______________________________________________
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