1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

GDScriptCache: Clear abandoned parser refs

This commit is contained in:
rune-scape
2024-07-23 12:38:30 -07:00
parent 8e36f98ea5
commit 86b23d0420
2 changed files with 34 additions and 1 deletions

View File

@@ -59,6 +59,7 @@ private:
String path;
uint32_t source_hash = 0;
bool clearing = false;
bool abandoned = false;
friend class GDScriptCache;
friend class GDScript;
@@ -79,6 +80,7 @@ public:
class GDScriptCache {
// String key is full path.
HashMap<String, GDScriptParserRef *> parser_map;
HashMap<String, Vector<ObjectID>> abandoned_parser_map;
HashMap<String, Ref<GDScript>> shallow_gdscript_cache;
HashMap<String, Ref<GDScript>> full_gdscript_cache;
HashMap<String, Ref<GDScript>> static_gdscript_cache;