Skip to content

Commit

Permalink
Fix bugs of destoring mutex in delete_tree_nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ecstasy-EC authored Jul 18, 2021
1 parent 33c68f6 commit bdbfbda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ikd_Tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1258,8 +1258,9 @@ void KD_TREE::delete_tree_nodes(KD_TREE_NODE ** root){
if (*root == nullptr) return;
Push_Down(*root);
delete_tree_nodes(&(*root)->left_son_ptr);
delete_tree_nodes(&(*root)->right_son_ptr);

delete_tree_nodes(&(*root)->right_son_ptr);

pthread_mutex_destroy( &(*root)->push_down_mutex_lock)
delete *root;
*root = nullptr;

Expand Down

0 comments on commit bdbfbda

Please sign in to comment.