This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]