Re: Subclassing NSControl and inheritance of target, action properties
Re: Subclassing NSControl and inheritance of target, action properties
- Subject: Re: Subclassing NSControl and inheritance of target, action properties
- From: Greg Parker <email@hidden>
- Date: Thu, 29 Jan 2015 19:47:44 -0800
> On Jan 29, 2015, at 5:29 PM, Quincey Morris <email@hidden> wrote:
>
> On Jan 29, 2015, at 17:18 , Roland King <email@hidden> wrote:
>>
>> I can find this http://lists.apple.com/archives/objc-language/2013/Apr/msg00119.html <http://lists.apple.com/archives/objc-language/2013/Apr/msg00119.html>, is that what you were remembering or is there something stronger my google-fu isn't finding, which wouldn't be for the first time?
>
> I think that’s it. A few months ago, as I said. ;)
>
> The only odd thing is “non-object”. Based on the rest of Greg’s statement, I think it’s a typo for “non-struct”. I can’t think of a reason why an 8-byte pointer would produce different results from an 8-byte int. But I don’t really know.
"Non-object" is correct. `atomic` makes a big difference for a strong or weak property of object type because objects have retain counts.
There is one exception to the "non-object scalar" claim. On 32-bit ARM non-object scalar properties that are larger than 4 bytes are slower when atomic. This includes types `double` and `long long`. The problem is that the 32-bit ARM ABI only aligns storage for those types at 4-byte boundaries, and the CPU does not guarantee atomicity for ordinary unaligned 8-byte memory access. Atomic accessors for those types need to do extra work.
--
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