The present invention provides techniques that allow concurrent collection
of cyclic garbage on reference counting systems. In general, candidate
objects are found that may be part of cyclic garbage. Each candidate
object has a reference count. Two tests are performed to determine if
concurrent operations have affected the reference counts of the candidate
objects. If concurrent operations have not affected the reference counts,
the candidate objects are collected as garbage. Additionally, during
garbage collection, the decrements to reference counts are delayed so
that increments occur before decrements and so that decrements are held a
predetermined time before being applied. This prevents decrementing a
reference count and collecting a cycle as garbage right before a
reference is added to an object in the cycle.