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] IdManager


Keith Seitz wrote:
"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."

This seems to only imply that whoever is creating ReferenceTypeID's must create a new and unique one every time, not that you need to cache them after the associated class has been unloaded... ?

So if a class is unloaded and then consequently reloaded, you read the above to mean that it would still get a new ID (not the old one)?

A class that is unloaded and then reloaded is a different class :-)


I guess our interpretation of "lifetime" is a little different. For me,
lifetime was considered the lifetime of the type within the application.
For you, it's the lifetime of the class as it exists in the VM. So when
it is unloaded, it's ID goes stale.

You're definition of "type" then is the static (compile time type). But in Java Class objects are associated with runtime types, not compile time types. I've been confused about this before and went so far as to document it so I wouldn't get confused again:

http://jcvm.sourceforge.net/share/jc/doc/jc.html#Classes%20and%20Types

Cheers,
-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]