classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] [RFA/JDWP] ReferenceKey


From: Archie Cobbs
Subject: Re: [cp-patches] [RFA/JDWP] ReferenceKey
Date: Fri, 17 Jun 2005 14:47:44 -0500
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041129

Keith Seitz wrote:
Okay, here'e where the weirdness starts. The ID manager (not yet
submitted) keeps a table which map objects to IDs. This is used to
quickly lookup Objects to see if they have an ID associated with them
already.

The ReferenceKey class is a SoftReference class with some logic to allow
the ID manager to clean-up garbage-collected Objects and their
ReferenceKeys.

Coupla questions. Disclaimer: I haven't really been paying attention,
so ignore me if these are stupid irrelevant..

- Could java.util.WeakHashMap be used instead of writing your own?
  See java.lang.VMString.intern() for an example.

- Do you mean to use hashCode()/equals() or System.identityHashCode()/==?

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]