lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r451514 - in /incubator/lucene.net/trunk/C#/src/Lucene.Net/Index: SegmentReader.cs TermInfosReader.cs
Date Sat, 30 Sep 2006 01:31:53 GMT
Author: aroush
Date: Fri Sep 29 18:31:52 2006
New Revision: 451514

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

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/TermInfosReader.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/SegmentReader.cs?view=diff&rev=451514&r1=451513&r2=451514
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs Fri Sep 29 18:31:52
2006
@@ -177,11 +177,13 @@
             }
         }
 		
-        ~SegmentReader()
-        {
-            // patch for pre-1.4.2 JVMs, whose ThreadLocals leak
-            //System.Threading.Thread.SetData(termVectorsLocal, null);
-        }
+		/*  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/trunk/C#/src/Lucene.Net/Index/TermInfosReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/TermInfosReader.cs?view=diff&rev=451514&r1=451513&r2=451514
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/TermInfosReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/TermInfosReader.cs Fri Sep 29 18:31:52
2006
@@ -53,11 +53,13 @@
 			indexEnum = new SegmentTermEnum(directory.OpenInput(segment + ".tii"), fieldInfos, true);
 		}
 		
+		/*  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);
+			// patch for pre-1.4.2 JVMs, whose ThreadLocals leak
+			//System.Threading.Thread.SetData(enumerators, null);
 		}
+		*/
 		
 		public int GetSkipInterval()
 		{



Mime
View raw message