reference counting

(redirected from Refcount)

reference counting

(programming)
A garbage collection technique where each memory cell contains a count of the number of other cells which point to it. If this count reaches zero the cell is freed and its pointers to other cells are followed to decrement their counts, and so on recursively.

This technique cannot cope with circular data structures. Cells in such structures refer (indirectly) to themselves and so will never have a zero reference count. This means they would never be reclaimed, even when there are no references from outside the structure.
This article is provided by FOLDOC - Free Online Dictionary of Computing (foldoc.org)
References in periodicals archive ?
Also, for each key, a reference counter refCount is used to store how many times the key is referenced by a foreign key.
We increment the refCount (in [MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII]) of each [K.sub.i] tuple corresponding to a foreign key tuple being inserted.
Notice that a deletion is temporarily accepted if it concerns a key tuple whose refCount is not 0.
14 shows that this deletion is postponed, since the refCount associated to mushroom soup in [MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII] is 1.
This is done by decreasing of 1 the corresponding refCount for mushroom soup.
conf do if ([M.bar] = M") ^ (q [member of] [F.sub.M"]) then A.K := < value(data)> end for Figure 11: DTD specifying the structure keyTree <!DOCTYPE keyTree| <!ELEMENT keyTree (context*)> <[ATTLIST keyTree nameKey CDATA #REQUIRED> <!ELEMENT context (target+)> <!ATTLIST context pos CDATA #REQUIRED> <[ELEMENT target (key+)> <!ATTLIST target pos CDATA #REQUIRED refCount CDATA #REQUIRED> <!ELEMENT key #PCDATA>]