Fix memory leak in balancing.

This commit is contained in:
2026-07-28 18:16:01 +01:00
parent 9c84118e63
commit dbbe05c582
2 changed files with 11 additions and 6 deletions
+7 -6
View File
@@ -21,18 +21,19 @@ int main() {
vase.insert(100, "gr\ntt", 5);
vase.insert(20, "gr\ntt", 5);
vase.type(5, 'k');
vase.type(6, 'l');
vase.type(7, 'm');
vase.type(8, 'n');
vase.type(5, '1');
vase.type(6, '2');
vase.type(7, '3');
vase.type(8, '4');
vase.erase(9, -2);
print_shard(vase.root);
LineIterator it(vase.root, 3);
std::string line;
while (it.next(line)) {
while (it.next(line))
std::cout << line << "\n";
}
std::cout << "\n\n"
<< vase.to_string();