summaryrefslogtreecommitdiff
path: root/java/src/Freeze/EvictorIteratorI.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/Freeze/EvictorIteratorI.java')
-rw-r--r--java/src/Freeze/EvictorIteratorI.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/java/src/Freeze/EvictorIteratorI.java b/java/src/Freeze/EvictorIteratorI.java
index 7ae781bd8e2..7f73cc4850b 100644
--- a/java/src/Freeze/EvictorIteratorI.java
+++ b/java/src/Freeze/EvictorIteratorI.java
@@ -28,6 +28,14 @@ class EvictorIteratorI extends Ice.LocalObjectImpl implements EvictorIterator
java.util.Map.Entry entry = (java.util.Map.Entry)iterator.next();
_identities.add(entry.getKey());
}
+
+ //
+ // Close the iterator explicitly. We don't want to wait for
+ // the garbage collection to destroy the iterator since the
+ // iterator consumes resources (database locks for instance).
+ //
+ ((Freeze.Map.EntryIterator)iterator).close();
+
_iterator = _identities.iterator();
}
@@ -53,13 +61,6 @@ class EvictorIteratorI extends Ice.LocalObjectImpl implements EvictorIterator
public void
destroy()
{
- //
- // Close the iterator explicitly. We don't want to wait for
- // the garbage collection to destroy the iterator since the
- // iterator consumes resources (database locks for instance).
- //
- ((Freeze.Map.EntryIterator)_iterator).close();
-
_identities = null;
_iterator = null;
}