[ http://issues.apache.org/jira/browse/LUCENENET-29?page=all ]
udanax updated LUCENENET-29:
----------------------------
Attachment: fixed_files.zip
modified file list.
--------------------------------------------
Search\FieldSortedHitQueue.cs
Search\FieldCacheImpl.cs
Search\FieldCache.cs
Search\IndexSearcher.cs
> some bug in .net 1.*
> --------------------
>
> Key: LUCENENET-29
> URL: http://issues.apache.org/jira/browse/LUCENENET-29
> Project: Lucene.Net
> Issue Type: Bug
> Environment: windows 2003
> Reporter: udanax
> Priority: Critical
> Attachments: fixed_files.zip
>
>
> some bug in .net 1.*
> if use sort() then we meet memory leak error.
> must be readerCache.Clear(); in Store() method.
> open Search\FieldSortedHitQueue.cs
> and add method.
> internal static void Close(IndexReader reader)
> {
> lock (Comparators.SyncRoot)
> {
> System.Collections.Hashtable readerCache = (System.Collections.Hashtable)
> Comparators[reader];
> if (readerCache != null)
> {
> readerCache.Clear();
> }
> Comparators.Remove(reader);
> }
> }
> and... FieldCacheImpl.cs add method,too
> public virtual void Close(IndexReader reader)
> {
> lock (this)
> {
> System.Collections.Hashtable readerCache = (System.Collections.Hashtable)
> cache[reader];
> if (readerCache != null)
> {
> readerCache.Clear();
> readerCache = null;
> }
> cache.Remove(reader);
> }
> }
> and then, edit Close() method of IndexSearcher class
> public override void Close()
> {
> FieldSortedHitQueue.Close(reader);
> Lucene.Net.Search.FieldCache_Fields.DEFAULT.Close(reader);
> if (closeReader)
> reader.Close();
> }
> And there is an omission in the article that I made.
> Additionaly the FieldCacheImpl Class was inherited an 'FieldCache interface
> (FirldCache.cs)'
> and you should define its 'close() method' as a 'void Close (IndexReader
> reader);'
> i wanna become lucene.net committer.
> how can i do?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira