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: "Shawn Erickson" <email@hidden>
- Date: Tue, 12 Aug 2008 12:36:20 -0700
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
_______________________________________________
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