reference counting

noun

Meaning

A memory management technique that tracks the number of pointers, references, or handles to a resource to determine when it is no longer needed and can be safely deallocated.

Examples

  • Modern garbage collectors often use reference counting to keep track of object lifetimes.
  • The system experienced a memory leak because circular dependencies prevented the reference counting mechanism from freeing the objects.

Synonyms: garbage collection, automatic memory management