lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r451516 - in /incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index: SegmentReader.cs TermInfosReader.cs
Date Sat, 30 Sep 2006 01:37:10 GMT
Author: aroush
Date: Fri Sep 29 18:37:10 2006
New Revision: 451516

URL: http://svn.apache.org/viewvc?view=rev&rev=451516
Log:
Fixed memory leak.  Was caused due to unused finalizer in SegmentReader and TermInfosReader.

Modified:
    incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/SegmentReader.cs
    incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/TermInfosReader.cs

Modified: incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/SegmentReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/SegmentReader.cs?view=diff&rev=451516&r1=451515&r2=451516
==============================================================================
--- incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/SegmentReader.cs (original)
+++ incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/SegmentReader.cs Fri Sep
29 18:37:10 2006
@@ -177,11 +177,13 @@
 			}
 		}
 		
-		~SegmentReader()
+        /*  Leaving this here will cause a memory leak under .NET 1.1
+        ~SegmentReader()
 		{
 			// patch for pre-1.4.2 JVMs, whose ThreadLocals leak
 			//System.Threading.Thread.SetData(termVectorsLocal, null);
 		}
+		*/
 		
 		protected internal override void  DoCommit()
 		{

Modified: incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/TermInfosReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/TermInfosReader.cs?view=diff&rev=451516&r1=451515&r2=451516
==============================================================================
--- incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/TermInfosReader.cs (original)
+++ incubator/lucene.net/tags/Lucene.Net_1_9_1/src/Lucene.Net/Index/TermInfosReader.cs Fri
Sep 29 18:37:10 2006
@@ -53,11 +53,13 @@
 			indexEnum = new SegmentTermEnum(directory.OpenInput(segment + ".tii"), fieldInfos, true);
 		}
 		
-		~TermInfosReader()
+        /*  Leaving this here will cause a memory leak under .NET 1.1
+        ~TermInfosReader()
 		{
             // patch for pre-1.4.2 JVMs, whose ThreadLocals leak
             //System.Threading.Thread.SetData(enumerators, null);
 		}
+        */
 		
 		public int GetSkipInterval()
 		{



Mime
View raw message