Skip to content

Commit

Permalink
Fix collision memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Feb 13, 2024
1 parent 990e7c0 commit c5115fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/terrain_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,12 +489,12 @@ void Terrain3D::_destroy_collision() {
Node *child = _debug_static_body->get_child(i);
LOG(DEBUG, "Freeing dsb child ", i, " ", child->get_name());
_debug_static_body->remove_child(child);
memfree(child); // TODO should be memdelete, this is a leak
memdelete(child);
}

LOG(DEBUG, "Freeing static body");
remove_child(_debug_static_body);
memfree(_debug_static_body); // TODO should be memdelete, this is a leak
memdelete(_debug_static_body);
_debug_static_body = nullptr;
}
}
Expand Down

0 comments on commit c5115fe

Please sign in to comment.