lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heng Mei" <>
Subject IndexSearcher memory leak?
Date Wed, 05 Jul 2006 23:58:03 GMT
Hi experts,
There seems to be a strange memory leak with the IndexSearcher.
I get an OutOfMemoryException after a few iterations of the following loop:
 	ramdir = new RAMDirectory( "path/to/my/directory" );
	searcher = new IndexSearcher( reader ); TermQuery( new Term( "field", "keyword")));
Note, ramdir and searcher are both instance variables.
The index is about 100mb, and the process is run with -Xmx256m.
**Strangely enough, if I comment out the "" line,
then there is no error.   Or, if I make searcher a local variable
(instead of an instance variable), then there also is no error.  I'm
running this on windows xp.

Has anyone observed this type of behavior before?
Any idea what might be causing the memory leak?

much thanks,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message