Dear All, I've detected some memory leaks using CLucene (version 2.3.3.4) and tracked this down to the reusableTokenStream interface of the StandardAnalyzer.
The StandardAnalyzer::SavedStreams object which is allocated on the first call to reusableTokenStream is eventually deleted (using an Object AbstractDeletor) but it does not have a destructor. The solution was to add a destructor as follows: index 3275c1b..6836629 100644 --- a/clucene-core-2.3.3.4/src/core/CLucene/analysis/standard/StandardAnalyzer.cpp +++ b/clucene-core-2.3.3.4/src/core/CLucene/analysis/standard/StandardAnalyzer.cpp @@ -54,6 +54,11 @@ CL_NS_DEF2(analysis,standard) { } + ~SavedStreams() + { + _CLDELETE(filteredTokenStream); + } + void close(){} Token* next(Token* token) {return NULL;} }; Could this patch be reviewed and incorporated into the master? Thanks, Anthony ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may _______________________________________________ CLucene-developers mailing list CLucene-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/clucene-developers