Jonathan Love

Search IconIcon to open search

Reference Counting

A form of memory management, usable by both languages that need a Compiler and those that need an Interpreter

Memory allocations (and References to those allocations) are counted - incrementing as more pointers reference the same allocation, and decrementing as fewer pointers reference the same allocation; when the number of pointers to an allocation reaches zero, the memory is immediately freed.

Can be prone to reference cycles, where a circle of pointers point at each other, preventing each from being deallocated


Interactive Graph