We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1707f12 commit 1716f9fCopy full SHA for 1716f9f
1 file changed
core/common/iterator/src/main/java/org/eclipse/rdf4j/common/iteration/DistinctIteration.java
@@ -27,7 +27,7 @@ public class DistinctIteration<E> extends FilterIteration<E> {
27
/**
28
* The elements that have already been returned.
29
*/
30
- private final Set<E> excludeSet;
+ private Set<E> excludeSet;
31
32
/*--------------*
33
* Constructors *
@@ -81,15 +81,8 @@ protected boolean accept(E object) {
81
82
@Override
83
protected void handleClose() {
84
-
85
- }
86
87
- /**
88
- * @param object
89
- * @return true if the object is in the excludeSet
90
- */
91
- private boolean inExcludeSet(E object) {
92
- return excludeSet.contains(object);
+ // help GC by removing link to set
+ excludeSet = null;
93
}
94
95
0 commit comments