From 1747becfc7bc37494ad74324d939be9b4b351c60 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Tue, 8 Feb 2022 00:27:01 +0800 Subject: [PATCH] Fix GridMap memory leak (cherry picked from commit 5d4a141c978dbac6cd89cf3afc6f75f0e5ac431e) --- modules/gridmap/grid_map.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index 629c787baba..62ad114de34 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -827,6 +827,7 @@ void GridMap::_update_octants_callback() { } while (to_delete.front()) { + memdelete(octant_map[to_delete.front()->get()]); octant_map.erase(to_delete.front()->get()); to_delete.pop_front(); }