Hi,

I am working on a program to index about 25gb of data and when I run 
CLucene with a PerFieldAnalyzerWrapper it leaks memory and inevitably 
crashes because it runs out of memory.

Here is my code:

lucene::analysis::PerFieldAnalyzerWrapper
   analyzer(new lucene::analysis::standard::StandardAnalyzer());
analyzer.addAnalyzer(_T("Authors"),
   new lucene::analysis::WhitespaceAnalyzer());
analyzer.addAnalyzer(_T("ReprintAuthor"),
   new lucene::analysis::WhitespaceAnalyzer());
analyzer.addAnalyzer(_T("Name"),
   new lucene::analysis::WhitespaceAnalyzer());
analyzer.addAnalyzer(_T("Email"),
   new lucene::analysis::WhitespaceAnalyzer());

If I replace that snippet with a plain WhitespaceAnalyzer there is no 
memory leak:

lucene::analysis::WhitespaceAnalyzer analyzer;

Am I using the PerFieldAnalyzerWrapper class wrong or is this a bug in 
CLucene?

Thanks!

-- 
Michael Levin <mele...@stanford.edu>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
CLucene-developers mailing list
CLucene-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clucene-developers

Reply via email to