From ff544df926d90724f2dbb6ef53667a1ee2ecdbb5 Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Sat, 10 Dec 2022 12:48:07 -0500 Subject: Fix `GDScriptCache` to not remove scripts/scenes individually when clearing --- modules/gdscript/gdscript_cache.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'modules/gdscript/gdscript_cache.h') diff --git a/modules/gdscript/gdscript_cache.h b/modules/gdscript/gdscript_cache.h index e7e1901d5d..0ee269f96c 100644 --- a/modules/gdscript/gdscript_cache.h +++ b/modules/gdscript/gdscript_cache.h @@ -87,7 +87,7 @@ class GDScriptCache { static GDScriptCache *singleton; - bool destructing = false; + bool cleared = false; Mutex mutex; @@ -104,13 +104,6 @@ public: static Ref get_packed_scene(const String &p_path, Error &r_error, const String &p_owner = ""); static void clear_unreferenced_packed_scenes(); - static bool is_destructing() { - if (singleton == nullptr) { - return true; - } - return singleton->destructing; - }; - static void clear(); GDScriptCache(); -- cgit v1.2.3