This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [cp-patches] [RFA/JDWP] ReferenceKey
- From: Archie Cobbs <archie at dellroad dot org>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: GCJ Patches <java-patches at gcc dot gnu dot org>,classpath patches <classpath-patches at gnu dot org>
- Date: Fri, 17 Jun 2005 14:47:44 -0500
- Subject: Re: [cp-patches] [RFA/JDWP] ReferenceKey
- References: <1119036348.4517.9.camel@lindt.uglyboxes.com>
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