Applications (servers) that export remote objects may not exit even if all remote objects have been garbage collected (remotely and locally) and there are no other non-daemon thread in the process other than an RMI thread which keeps the process alive. The distributed GC uses a sun.misc.Ref as a weak reference for each remote implementations that is not referenced by any client. As such, the distributed GC relies on a value in a sun.misc.Ref to be set to null when a remote implementation object is garbage collected locally. Since weak references are not freed by the garbage collector in an agressive manner (and may not be freed at all), the remote implementation object may remain in the object table forever and a thread that keeps a server alive while there are remote objects in the object table will never be stopped. Therefore, RMI servers may never exit.