[Biojava-dev] DP memory leak

Thomas Down thomas at derkholm.net
Tue Jan 6 09:36:49 EST 2004


Once upon a time, Lachlan James Coin wrote:
> I wasn't sure if there was enough consensus to commit my changes, so I 
> haven't fixed anything yet:
> - adding a deregisterAlphabet(name) method to AlphabetManager and 
> calling this from finalize in SimpleMarkovModel

I'm not a big finalize fan, but I guess this makes sense.

> - making alphabetToIndex a WeakHashMap  (I'm not 100% sure that this is 
> OK with regard to standard alphabets)

Does this actually help?  The AlphabetIndex implementations keep
hard references to their corresponding Alphabets.  I thought
WeakHashMap still kept hard references to values until their keys
are enqueued, so I don't see how an Alphabet can ever be collected.

Or am I missing something?

     Thomas.


More information about the biojava-dev mailing list