Added missing destructor for Navigation2D

Although destructor call was missing, it still doesn't heal #36537 memory leaks. Further description how that might be overcome - on GitHub

Partialy covers #36537
This commit is contained in:
Dominik 'dreamsComeTrue' Jasiński 2020-02-25 23:43:59 +01:00
parent 2d980f6f13
commit 51cbf414fc
2 changed files with 5 additions and 0 deletions

View File

@ -88,3 +88,7 @@ Navigation2D::Navigation2D() {
set_cell_size(10); // Ten pixels
set_edge_connection_margin(100);
}
Navigation2D::~Navigation2D() {
Navigation2DServer::get_singleton()->free(map);
}

View File

@ -66,6 +66,7 @@ public:
RID get_closest_point_owner(const Vector2 &p_point) const;
Navigation2D();
~Navigation2D();
};
#endif // NAVIGATION_2D_H