in reply to Re^3: Tool to detect potential memory leak in code
in thread Tool to detect potential memory leak in code

“Reference counting” is a mechanism for garbage collection. It allows objects to be recognized as garbage so that they may be disposed-of. It does so in a way that allows this determination to be made while considering only the one object; the one counter.

If a garbage-collection algorithm does not employ counters, the entire application memory-space must be periodically “walked,” to “flag” objects as being in-use or not. Either way, it probably involves a memory-write. The crippling characteristic of this approach is ... page faults. You must “touch” everything, hence causing it to be paged-in. A counter-based approach, per contra, doesn't increase the virtual-memory footprint unnecessarily.