I was wrong, analyzer does have the close function. I closed my analyzer, but the steady climb in memory is still there.
I wonder if I should create a global analyzer variable and enclose it in a lock to make sure there isn't any thread issues and use that instead. Could it be a leak in the analyzer itself? On Tue, Nov 29, 2011 at 12:16 PM, Trevor Watson < powersearchsoftw...@gmail.com> wrote: > 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) < > aye...@ayende.com> wrote: > > You need to close the analyzer. > > > > On Tue, Nov 29, 2011 at 12:32 AM, Trevor Watson < > > powersearchsoftw...@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. > >> > > >