classpath-patches
[Top][All Lists]
Advanced

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

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


From: Keith Seitz
Subject: Re: [cp-patches] [RFA/JDWP] IdManager
Date: Mon, 20 Jun 2005 09:53:29 -0700

On Mon, 2005-06-20 at 10:22 -0500, Archie Cobbs wrote:
> Keith Seitz wrote:
> > +  /* Mapping of class (Class) to IDs (ReferenceTypeId) for reference
> > +     types. Unlike other types, reference id types are NEVER released. */
> > +  private Hashtable _classTable;
> 
> Another question born from my own ignorance... :-)
> 
> What if a class(loader)s are garbage collected? Would this hash table
> then become a memory leak?gets

Yes, but unfortunately, JDWP specifically says that reference type IDs
are never reused, even if the classes are gc'd or unloaded. The same ID
is valid for any reference type for the entirety of the debugging
session. Or at least that's how I interpret this explanation of
"referenceTypeId":

"Uniquely identifies a reference type in the target VM. It should not be
assumed that for a particular class, the classObjectID and the
referenceTypeID are the same. A particular reference type will be
identified by exactly one ID in JDWP commands and replies throughout its
lifetime A referenceTypeID is not reused to identify a different
reference type, regardless of whether the referenced class has been
unloaded."

?
Keith





reply via email to

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