lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trevor Watson <powersearchsoftw...@gmail.com>
Subject [Lucene.Net] Re: Memory Leak in code (mine or Lucene?) 2.9.2.2
Date Tue, 29 Nov 2011 17:16:47 GMT
I don't recall seeing a close function on the analyzer.  But I will
definitely take a look. Thanks!

On Tuesday, November 29, 2011, Oren Eini (Ayende Rahien) <ayende@ayende.com>
wrote:
> You need to close the analyzer.
>
> On Tue, Nov 29, 2011 at 12:32 AM, Trevor Watson <
> powersearchsoftware@gmail.com> wrote:
>
>> I'm using the following block of code.  The document is created in
another
>> function and written to the Lucene index via an IndexWriter
>>
>> private void SaveFileToFileInfo(Lucene.Net.Index.IndexWriter iw, bool
>> delayCommit, string sDataPath)
>>        {
>>            Document doc = getFileInfoDoc(sDataPath);
>>            Analyzer analyzer = clsLuceneFunctions.getAnalyzer();
>>            if (this.FileID == 0)
>>            {
>>                string s = "";
>>            }
>>            iw.UpdateDocument(new Lucene.Net.Index.Term("FileId",
>> this.fileID.ToString("000000000")), doc, analyzer);
>>            analyzer = null;
>>            doc = null;
>>            if (!delayCommit)
>>                iw.Commit();
>>        }
>>
>> When the UpdateDocument line is commented out, everything seems to run
>> fine.  When that line of code is run, it slowly creeps up.  However, it
>> used to work on some computers and now works on 1 or 2, but fails on our
>> client's computers.
>>
>> Is there an issue with UpdateDocument that I am not aware of in 2.9.2.2?
>>
>> Thanks in advance.
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message