diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/navigation_2d.cpp | 4 | ||||
-rw-r--r-- | scene/2d/navigation_2d.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/scene/2d/navigation_2d.cpp b/scene/2d/navigation_2d.cpp index e91560a7e0..bbabfa16c7 100644 --- a/scene/2d/navigation_2d.cpp +++ b/scene/2d/navigation_2d.cpp @@ -88,3 +88,7 @@ Navigation2D::Navigation2D() { set_cell_size(10); // Ten pixels set_edge_connection_margin(100); } + +Navigation2D::~Navigation2D() { + Navigation2DServer::get_singleton()->free(map); +} diff --git a/scene/2d/navigation_2d.h b/scene/2d/navigation_2d.h index 16e20d8f9b..5520f5006e 100644 --- a/scene/2d/navigation_2d.h +++ b/scene/2d/navigation_2d.h @@ -66,6 +66,7 @@ public: RID get_closest_point_owner(const Vector2 &p_point) const; Navigation2D(); + ~Navigation2D(); }; #endif // NAVIGATION_2D_H |