Auto-release static GDTypes at exit.

This fixes "unclaimed StringName" warnings and improves engine shutdown correctness.
This commit is contained in:
Lukas Tenbrink
2026-01-09 13:46:28 +01:00
parent 64bc9a25a3
commit 17ef5afa6c
3 changed files with 17 additions and 1 deletions

View File

@@ -2383,8 +2383,10 @@ void Object::assign_type_static(GDType **type_ptr, const char *p_name, const GDT
// Assigned while we were waiting.
return;
}
type = memnew(GDType(super_type, StringName(p_name, true)));
type = memnew(GDType(super_type, StringName(p_name)));
*type_ptr = type;
ClassDB::gdtype_autorelease_pool.push_back(type_ptr);
}
Object::~Object() {