Content deleted Content added
m Clarification |
m External links correction process; see User:Kate/extlinks |
||
Line 3:
Simple reference counts require frequent updates. Whenever a reference is destroyed or overwritten, the reference count of the object it references is decremented, and whenever one is created or copied, the reference count of the object it references is incremented.
== Advantages and
Reference counting has two main disadvantages over the more common [[tracing garbage collection]], both of which require additional mechanisms to ameliorate. One is that the frequent updates it involves are a source of inefficency. The other is that the naive algorithm described above can't handle reference cycles, where an object refers indirectly to itself; cycles of objects are never collected. It also has the more minor problem that every object must reserve space for a reference count.
Line 51:
Weighted reference counting was independently devised by Bevan, in the paper ''Distributed garbage collection using reference counting'', and Watson, in the paper ''An efficient garbage collection scheme for parallel computer architectures'', both in 1987.
== External
* [http://www.memorymanagement.org/articles/recycle.html#reference The Memory Manager Reference: Beginner's Guide: Recycling: Reference Counts]
|