Auto-release static GDTypes at exit.
This fixes "unclaimed StringName" warnings and improves engine shutdown correctness.
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user