Distributed garbage collection

Distributed garbage collection (DGC) in computing is a particular case of garbage collection where a remote client can hold references to an object.

DGC uses some combination of the classical garbage collection (GC) techniques, tracing and reference counting.

DGC is complex and can be costly and slow in freeing memory.

As a cheap way of avoiding DGC algorithms, one can rely on a time lease – set or configured on the remote object; it is the stub's task to periodically renew the lease on the remote object.

If the lease has expired, the server process (the process owning the remote object) can safely assume that either the client is no longer interested in the object, or that a network partition or crash obstructed lease renewal, in which case it is "hard luck" for the client if it is in fact still interested.