Re: non-pointer instance variable
Re: non-pointer instance variable
- Subject: Re: non-pointer instance variable
- From: Greg Parker <email@hidden>
- Date: Thu, 15 Jul 2010 14:26:13 -0700
On Jul 15, 2010, at 2:13 PM, Michael Link wrote:
> Is it necessary to use objc_atomicCompareAndSwapInstanceVariableBarrier when setting an instance variable such as an NSInteger in a GC app? Or would OSAtomicCompareAndSwap64Barrier be more appropriate?
The objc version is necessary only for GC pointers. For other values both functions will work, but the OSAtomic version may be faster.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
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