瀏覽代碼

Fix GridMap memory leak

Haoyu Qiu 3 年之前
父節點
當前提交
5d4a141c97
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      modules/gridmap/grid_map.cpp

+ 1 - 0
modules/gridmap/grid_map.cpp

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