Re: ARC conversion help - CFErrorRef* and NSError**
Re: ARC conversion help - CFErrorRef* and NSError**
- Subject: Re: ARC conversion help - CFErrorRef* and NSError**
- From: Quincey Morris <email@hidden>
- Date: Mon, 29 Oct 2012 23:23:15 -0700
On Oct 29, 2012, at 22:24 , Rick Mann <email@hidden> wrote:
> Any way to introduce (into clang) an __attribute__ or something similar on the declaration of NSError to say it's equivalent to CFErrorRef?
Except that they're not equivalent, in memory management terms. CF and NS objects have different rules.
IIRC, it's also not safe to assume that CF and NS (when toll-free bridged for a class) use the same underlying classes. In some cases they do (often these are "NSCFxxx" classes at run time), but in a few cases they don't. In yet other cases (collection classes, for example) it's possible to create CF objects of a nominally toll-free bridged class which don't work correctly as NS objects using NS method access (collections that contain non-object pointers or that use non-standard memory allocators, for example).
_______________________________________________
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