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: Tue, 21 Jun 2005 10:51:44 -0700

On Mon, 2005-06-20 at 13:48 -0500, Archie Cobbs 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)?

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.

I can buy that, especially given this tidbit:

> In any case, how is a class ever going to be unloaded if your
> Hashtable is referencing it? :-)

TRUE!

So now that mens that I'd have to use a similar strategy to what is done
for objects, which we're discussing somewhere else, I think...

Keith





reply via email to

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