On Fri, Feb 27, 2009 at 10:40 AM, David M. Lloyd <david.ll...@redhat.com> wrote:
> Seems like a reasonable alternate approach, *however* I think there ought to
> be a way to clear the reference as well,

Do you have a use case?

*If* we wanted to support removals (I don't think we should), I would
do something like this:

 public class ClassLoader {
   public Reference<?> keepReferenceTo(Object o) { ... }
   ...
 }

You could call clear() on the returned reference to clear the
ClassLoader's reference. Internally, it would use some sort of CAS
doubly-linked list.

Bob

Reply via email to