[Biojava-dev] Build system changes

Thomas Down thomas at derkholm.net
Wed Jan 21 08:07:58 EST 2004


Once upon a time, Matthew Pocock wrote:
>  --- Thomas Down <thomas at derkholm.net> wrote: 
> > adds up.  If all the test classes are hanging around
> > indefintiely,
> > and referncing lots of classes in BioJava, we might
> > well have
> > a bit source of leaking memory right there :-(.
> 
> This could potentially be sorted by using multiple
> ClassLoaders - if JUnit can be convinced to drop the
> dead tests, then the class loader instance for those
> tests will become unreachable and all it's classes can
> be garbage collected.

I don't think this is true: AFAICT modern VMs garbage collect classes
in pretty much the same way they handle objects.  So long as
references to the TestCase classes are dropped, then the garbage
collector should handle the rest.

> This is beginning to sound like
> heavy JUnit hackery though. Also, the overhead of
> loading the needed biojava classes repeatedly may put
> us back towards our original performance problems.

I'd hope that the VM ought to do a reasonable job of this:
really fundamental parts of the library, like symbols, get used
in most tests, so I don't think they'll ever be unloaded.

Even if the whole of BJ got unloaded after every test, we'd
*still* be winning because it would save execing a fresh VM
for every test.

     Thomas.


More information about the biojava-dev mailing list