5 ms·
> So reference counting works by the programmer knowing the lifetime of each object allowing them to only increment / decrement the refcount once, and trusting
by viktorcode 4y ago
> So reference counting works by the programmer knowing the lifetime of each object allowing them to only increment / decrement the refcount once, and trusting that the raw uncounted pointers they use elsewhere are always valid? There's another word we have for this: manual memory management.
Programmer, or compiler. In latter case it is automatic reference counting, which I never heard called "manual memory management".