3 ms·
In a language like C and its conventional implementations, how do you intend to find all the pointers in order to zero them?
by chrisseaton 8y ago
In a language like C and its conventional implementations, how do you intend to find all the pointers in order to zero them?
- saagarjha 8y agoMike Ash's article goes into more depth into how something like this is implemented in Objective-C: https://www.mikeash.com/pyblog/friday-qa-2010-07-16-zeroing-weak-references-in-objective-c.html https://www.mikeash.com/pyblog/friday-qa-2010-07-16-zeroing-.... To put it short, references are kept in a big dictionary and zeroed out on deallocation.