From 84867275bb2d5c1642820473a6069ee0137e3be7 Mon Sep 17 00:00:00 2001 From: qarmin Date: Mon, 11 May 2020 21:04:39 +0200 Subject: [PATCH] Fix memory leak with light maps --- .../rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp b/servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp index 3f0062b2ae2..0436556ce64 100644 --- a/servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp +++ b/servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp @@ -3410,6 +3410,8 @@ RasterizerSceneHighEndRD::~RasterizerSceneHighEndRD() { memdelete_arr(scene_state.gi_probes); memdelete_arr(scene_state.directional_lights); memdelete_arr(scene_state.lights); + memdelete_arr(scene_state.lightmaps); + memdelete_arr(scene_state.lightmap_captures); memdelete_arr(scene_state.reflections); memdelete_arr(scene_state.decals); }