Skip to content

Commit 1716f9f

Browse files
committed
code cleanup
1 parent 1707f12 commit 1716f9f

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

core/common/iterator/src/main/java/org/eclipse/rdf4j/common/iteration/DistinctIteration.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class DistinctIteration<E> extends FilterIteration<E> {
2727
/**
2828
* The elements that have already been returned.
2929
*/
30-
private final Set<E> excludeSet;
30+
private Set<E> excludeSet;
3131

3232
/*--------------*
3333
* Constructors *
@@ -81,15 +81,8 @@ protected boolean accept(E object) {
8181

8282
@Override
8383
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);
84+
// help GC by removing link to set
85+
excludeSet = null;
9386
}
9487

9588
/**

0 commit comments

Comments
 (0)