Skip to content

Commit 05918d5

Browse files
committed
fix: release the already kept reference when set_candidates is called
1 parent ff89675 commit 05918d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/TreeFilterer.h

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ class TreeFilterer {
5656

5757

5858
if (keepReference) {
59+
if (candidates_view != nullptr) {
60+
// release the already kept reference
61+
candidates_view.Unref();
62+
}
5963
// store a view of candidates in case filter was called
6064
candidates_view = get_ref<ReferenceType, ArrayType>(candidates_);
6165
}

0 commit comments

Comments
 (0)