> AFAIK, CF objects store the retain count in an "ivar" (or a struct field to 
> be exact) and
> standard Obj-C objects ref count is stored in an external hash collection 
> (CFBasicHash on 10.6). 

One might get away with it then, as presumably the hash key is the address of 
the object and that is constant for the lifetime of the object.  Weird 
implementation.  Expensive, in terms of CPU cycles, for retain and release.  
The retain count should be an iVar of NSObject, seems to me.

This post also makes interesting reading:

http://www.mikeash.com/pyblog/friday-qa-2010-01-22-toll-free-bridging-internals.html

I see that my assumption that Toll-Free bridged CF and Obj-C types have the 
same internal layout was false.  Instead, it's all smoke and mirrors.

Paul Sanders.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to