This is the mail archive of the java@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: 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]