I'm studying ARC. And now about zeroing weak pointer. OK I understood all the features. The semantic of weak reference is just same with weak reference of GC system, but you know, Objective-C doesn't use GC (except special case) so I can't understand how this works.
I'm a little complicated guy, so I need to know underlying implementation principal to accept the feature to use. But the problem is it's very hard to find document which describes the principal of zeroing-weak pointer :(
IMO, the only way to make this work is tracking and keeping all pointers referencing itself at runtime, and setting them all nil
when its referencing count becomes 0
. But this looks too heavy and stupid. I believe a lot better solution used in actual ARC implementation.
Can you help me to find the documentation? Or direct description would be more great!