Browse Source

Fix GridMap memory leak

(cherry picked from commit 5d4a141c978dbac6cd89cf3afc6f75f0e5ac431e)
Haoyu Qiu 3 years ago
parent
commit
4ad179b75d
1 changed files with 1 additions and 0 deletions
  1. 1 0
      modules/gridmap/grid_map.cpp

+ 1 - 0
modules/gridmap/grid_map.cpp

@@ -791,6 +791,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();
 	}