Skip to content

Commit e8122de

Browse files
Abduqodiri Qurbonzodaqurbonzoda
authored andcommitted
Fix memory leak in set iterator
1 parent 5a73180 commit e8122de

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/commonMain/src/implementations/immutableSet/PersistentHashSetIterator.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ internal open class PersistentHashSetIterator<E>(node: TrieNode<E>) : Iterator<E
5454
if (i > 0) {
5555
path[i - 1].moveToNextCell()
5656
}
57+
path[i].reset(TrieNode.EMPTY.buffer, 0)
5758
}
5859
hasNext = false
5960
}

0 commit comments

Comments
 (0)