On Tue, Aug 5, 2014 at 3:19 AM, Nick Wellnhofer <[email protected]> wrote: > Yes, the special refcount value would be lost as soon as a host object is > created. But we could use the second least significant bit of cfish_ref_t > for the immortal flag, regardless of whether it contains a refcount or a > host object. This would mean to mask the flag to zero whenever the host > object is accessed but that's a small price to pay. > > Then we could check the flag in Obj#Destroy and throw an exception if it's > set.
+1 More on hiding bits in pointers: https://www.mikeash.com/pyblog/friday-qa-2013-09-27-arm64-and-you.html http://www.sealiesoftware.com/blog/archive/2013/09/24/objc_explain_Non-pointer_isa.html Marvin Humphrey
