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: Archie Cobbs
Subject: Re: [cp-patches] [RFA/JDWP] IdManager
Date: Tue, 21 Jun 2005 14:08:56 -0500
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041129

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




reply via email to

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