Properly dealocate records, implement Cloneable.
[yaz4j-moved-to-github.git] / src / main / java / org / yaz4j / ResultSet.java
index 01e2478..3d89bd7 100644 (file)
@@ -43,8 +43,9 @@ public class ResultSet {
     }
 
     public Record getRecord(int index) {
-      SWIGTYPE_p_ZOOM_record_p recordTemp = yaz4jlib.ZOOM_resultset_record(resultSet, index);
-      return new Record(recordTemp);
+      SWIGTYPE_p_ZOOM_record_p record = 
+        yaz4jlib.ZOOM_resultset_record(resultSet, index);
+      return new Record(record, this);
     }
 
     public long getSize() {
@@ -59,4 +60,4 @@ public class ResultSet {
             disposed = true;
         }
     }
-}
\ No newline at end of file
+}