Auto-release static GDTypes at exit.
This fixes "unclaimed StringName" warnings and improves engine shutdown correctness.
This commit is contained in:
parent
64bc9a25a3
commit
17ef5afa6c
3 changed files with 17 additions and 1 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue