mirror of
https://github.com/godotengine/godot.git
synced 2024-12-01 16:42:26 +00:00
Merge pull request #66687 from Waridley/free_gdn_method_binds
free NativeExtensionMethodBinds on unregister
This commit is contained in:
commit
a47f9bd53a
@ -1538,7 +1538,11 @@ void ClassDB::register_extension_class(ObjectNativeExtension *p_extension) {
|
||||
}
|
||||
|
||||
void ClassDB::unregister_extension_class(const StringName &p_class) {
|
||||
ERR_FAIL_COND(!classes.has(p_class));
|
||||
ClassInfo *c = classes.getptr(p_class);
|
||||
ERR_FAIL_COND_MSG(!c, "Class " + p_class + "does not exist");
|
||||
for (KeyValue<StringName, MethodBind *> &F : c->method_map) {
|
||||
memdelete(F.value);
|
||||
}
|
||||
classes.erase(p_class);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user