lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31240] - Memory leak when sorting
Date Wed, 29 Sep 2004 11:41:08 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31240>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31240

Memory leak when sorting





------- Additional Comments From rafal@caltha.pl  2004-09-29 11:41 -------
Comparator cache entries couldn't ever go away because IndexReader objects used
as weak referenced keys were strong-references by the very same
WeakHashMap$Entry object. This was because IndexReader was referenced from an
instance variable of the Comparator objects - an implicit one because final
IndexReader reader argument of comparator* method is used inside Comparator
object initialization. Moving initialization of the fieldOrder/index variables
outside object initialization eliminates the implicit reader field, thus
allowing IndexReader object's to be GCd correctly.

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message