You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by Joel Nelson <jo...@gmail.com> on 2006/02/19 19:41:11 UTC

Bug in caching in the BTree?

As far as I can tell, the WeakHashMap cache in
org.apache.xindice.core.filer.BTree is not being used correctly.

The value objects in the cache are WeakReference objects, and this
seems to make no sense considering what WeakHashMap is intended to do.
(Allow garbage collection of key and value objects when the key object
has no more strong references to it)

Can someone please audit this code? Maybe I am way off.