You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix cyclic references in GDScript 2.0
This commit is contained in:
@@ -149,10 +149,17 @@ GDScriptFunction::GDScriptFunction() {
|
||||
}
|
||||
|
||||
GDScriptFunction::~GDScriptFunction() {
|
||||
get_script()->member_functions.erase(name);
|
||||
|
||||
for (int i = 0; i < lambdas.size(); i++) {
|
||||
memdelete(lambdas[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < argument_types.size(); i++) {
|
||||
argument_types.write[i].script_type_ref = Ref<Script>();
|
||||
}
|
||||
return_type.script_type_ref = Ref<Script>();
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
|
||||
MutexLock lock(GDScriptLanguage::get_singleton()->mutex);
|
||||
|
||||
Reference in New Issue
Block a user