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] Memory Leak in code (mine or Lucene?) 2.9.2.2
Date Mon, 28 Nov 2011 22:32:31 GMT
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