Skip to content

Commit

Permalink
use nokey mode for inner
Browse files Browse the repository at this point in the history
  • Loading branch information
ban-nobuhiro committed Oct 4, 2024
1 parent f452dc9 commit 2d9ea33
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions include/interface_destroy.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ namespace yakushima {

[[maybe_unused]] static status destroy() {
if (storage::get_storages()->empty()) { return status::OK_ROOT_IS_NULL; }
std::vector<std::tuple<std::string, tree_instance*>>
tuple_list;
scan_root<tree_instance, false>(
std::vector<tree_instance*> tuple_list;
scan_root<tree_instance, false, false>(
storage::get_storages(), "", scan_endpoint::INF, "", scan_endpoint::INF, tuple_list, nullptr, 0);
for (auto&& elem : tuple_list) {
base_node* root = std::get<1>(elem)->load_root_ptr();
base_node* root = elem->load_root_ptr();
if (root == nullptr) { continue; }
root->destroy();
delete root; // NOLINT
std::get<1>(elem)->store_root_ptr(nullptr);
elem->store_root_ptr(nullptr);
}

base_node* tables_root = storage::get_storages()->load_root_ptr();
Expand Down

0 comments on commit 2d9ea33

Please sign in to comment.