See Also: PhantomReference Members
Implements a phantom reference, which is the weakest of the three types of references. Once the garbage collector decides that an object obj is phantom-reachable, it is being enqueued on the corresponding queue, but its referent is not cleared. That is, the reference queue of the phantom reference must explicitly be processed by some application code. As a consequence, a phantom reference that is not registered with any reference queue does not make any sense.
Phantom references are useful for implementing cleanup operations that are necessary before an object gets garbage-collected. They are sometimes more flexible than the Java.Lang.Object.JavaFinalize method.