lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject svn commit: r419723 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/store/RAMDirectory.java src/test/org/apache/lucene/index/TestIndexWriterMerging.java
Date Thu, 06 Jul 2006 22:14:08 GMT
Author: hossman
Date: Thu Jul  6 15:14:07 2006
New Revision: 419723

URL: http://svn.apache.org/viewvc?rev=419723&view=rev
Log:
LUCENE-623: RAMDirectory.close() now nulls out it's 'file' references

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/src/java/org/apache/lucene/store/RAMDirectory.java
    lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriterMerging.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=419723&r1=419722&r2=419723&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Thu Jul  6 15:14:07 2006
@@ -87,7 +87,9 @@
      indexes.  This will improve the performance of many types of queries
      against a non-optimized index. (Andrew Hudson via Yonik Seeley)
 
-
+  2. LUCENE-623: RAMDirectory.close now nulls out it's reference to all
+     internal "files", allowing them to be GCed even if references to the
+     RAMDirectory itself still exist. (Nadav Har'El via Chris Hostetter)
 
 Release 2.0.0 2006-05-26
 

Modified: lucene/java/trunk/src/java/org/apache/lucene/store/RAMDirectory.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/store/RAMDirectory.java?rev=419723&r1=419722&r2=419723&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/store/RAMDirectory.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/store/RAMDirectory.java Thu Jul  6 15:14:07
2006
@@ -198,7 +198,8 @@
     };
   }
 
-  /** Closes the store to future operations. */
+  /** Closes the store to future operations, releasing associated memory. */
   public final void close() {
+    files = null;
   }
 }

Modified: lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriterMerging.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriterMerging.java?rev=419723&r1=419722&r2=419723&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriterMerging.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/index/TestIndexWriterMerging.java Thu Jul
 6 15:14:07 2006
@@ -61,9 +61,9 @@
 
     writer.addIndexes(new Directory[]{indexA, indexB});
     writer.close();
-    merged.close();
 
     fail = verifyIndex(merged, 0);
+    merged.close();
 
     assertFalse("The merged index is invalid", fail);
   }



Mime
View raw message