This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: classloading from so
- From: Jeff Sturm <jsturm at one-point dot com>
- To: "Boehm, Hans" <hans_boehm at hp dot com>
- Cc: "'tromey at redhat dot com'" <tromey at redhat dot com>, Lars Andersen <lars at rimfaxe dot com>, <java at gcc dot gnu dot org>
- Date: Tue, 24 Sep 2002 18:50:59 -0400 (EDT)
- Subject: RE: classloading from so
On Tue, 24 Sep 2002, Boehm, Hans wrote:
> > It appears if you use the SharedLibLoader, instead of the built-in
> > one, then you can get class unloading. I have never tried it, but I
> > do note that SharedLibLoader.finalize() calls dlclose(). Of course,
> > for this to work, the SharedLibLoader and all its classes must be
> > collected.
>
> Hopefully the class loader is referenced from a static variable in the
> loaded library?
It isn't. SharedLibLoader doesn't set the "loader" field at all on its
loaded classes. I'm pretty sure this is a bug. I'll file a PR.
> Thus this can never happen because the garbage
> collector views the library static data as roots and would thus never
> collect the class loader?
I suspect it could.
Jeff