gcj-compiled jigsaw is running
Jeff Sturm
jsturm@one-point.com
Wed May 2 12:12:00 GMT 2001
On 2 May 2001, Per Bothner wrote:
> > Even if you get around that, there is no way to unload a compiled class,
> > because the class instance isn't dynamically allocated and cannot be
> > garbage collected.
>> But shared libraries can be unloaded, I thought, so at least in
> principle we coudl unload a compield class.
Yes, in principle you can dlclose a class, if:
1) there are no live instances remaining
2) the class object and static fields are unreferenced
3) no thread is executing a static method
I think it would be difficult to guarantee these conditions because the
class object and static members are not heap objects. In theory a tracing
collector could perhaps determine when there are no references anywhere to
the text or data sections of a dynamic shared object, though I've never
heard of such a thing... ordinarily GC is only concerned with reclaiming
heap objects.
Jeff
More information about the Java
mailing list