Re: Zeroing out instance variables
Re: Zeroing out instance variables
- Subject: Re: Zeroing out instance variables
- From: "Paul Sanders" <email@hidden>
- Date: Sat, 17 Apr 2010 15:54:07 +0100
> 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 (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