From 583b48c43f56f8f0a3b033d9e9ee7f4c1e47bc5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Fri, 23 Feb 2024 19:30:55 +0100 Subject: [PATCH] Fix leak of scene used for customization during export (cherry picked from commit d103b5570f7a0de78d2a285c8ebb43107004d1b9) --- editor/export/editor_export_platform.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp index 733003db1ae..d4596005202 100644 --- a/editor/export/editor_export_platform.cpp +++ b/editor/export/editor_export_platform.cpp @@ -784,6 +784,8 @@ String EditorExportPlatform::_export_customize(const String &p_path, LocalVector Error err = ResourceSaver::save(s, save_path); ERR_FAIL_COND_V_MSG(err != OK, p_path, "Unable to save export scene file to: " + save_path); } + + node->queue_free(); } else { Ref res = ResourceLoader::load(p_path, "", ResourceFormatLoader::CACHE_MODE_IGNORE); ERR_FAIL_COND_V(res.is_null(), p_path);