Skip to content

Commit 2e95ab9

Browse files
committed
[benchmark] Actually deallocate nodes 🤭
1 parent 3f83a23 commit 2e95ab9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

benchmark/single-source/RandomTree.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ extension UnmanagedSearchTree {
117117
root.left.deallocate()
118118
root.right.deallocate()
119119
}
120-
withExtendedLifetime(root) {}
120+
root.release()
121121
}
122122
}
123123

@@ -183,6 +183,7 @@ extension PointerSearchTree {
183183
guard let root = root else { return }
184184
root.pointee.left.deallocate()
185185
root.pointee.right.deallocate()
186+
root.deallocate()
186187
}
187188
}
188189

0 commit comments

Comments
 (0)