Name: yyT116575 Date: 02/19/2001
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed-mode)
It would be nice for some code to treat all references equal.
In Java, references are not transparent, you need to get()
the object before you can use it. Because of this, references
are different from the object they refer to.
Sometime you would like to treat a normal objects (that are
subject to normal garbage collection) as 'hard' referenced objects.
At the moment this is not possible, because (1) you can't
subclass java.lang.ref.Reference and (2) java.lang.ref.Reference
is abstract.
Perhaps a java.lang.ref.HardReference subclass of java.lang.ref.Reference
would be handy. For this kind of reference, normal garbage collection
would apply.
(Review ID: 117234)
======================================================================