Re: class gc (fwd)

Date view Thread view Subject view Author view

From: Godmar Back (gback@cs.utah.edu)
Date: Thu Dec 17 1998 - 17:05:10 EST


>
> Yes. At least, I think so.
>
> I may be wrong, though.
>
> Actually, I think I'm probably wrong: if there's no object of that
> class, and the class loader doesn't hold a reference, the class will
> be gc'd.
>
> Then loadClass() will give a duplicate name error, but the class
> object you get through findLoadedClass is bogus.
>

That's the crux: if there were no way to get ahold of the unloaded
class, it wouldn't really matter WHEN we gc it, since the gc of classes
has no side-effects except the finalization of static variables.
This was my thinking.

But there's also findLoadedClass...

So, shall we put a hashtable in each classloader or should we walk
the class entry pool everytime we walk a classloader?

The latter version would require a special walkMethod and allocation type...

        - Godmar


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:21 EDT