[Biojava-dev] DP memory leak

Lachlan James Coin lc1 at sanger.ac.uk
Tue Jan 6 08:54:57 EST 2004


OK - good point.  I don't really understand the AlphabetManager code 
that well.  

Can we put something in the deregisterAlphabet method that will take 
care of this?

Lachlan


Thomas Down wrote:

>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