mirror of
https://github.com/godotengine/godot.git
synced 2025-10-22 17:33:33 +00:00
Fix cyclic references in GDScript 2.0
This commit is contained in:
parent
e8f9cd8ac5
commit
5704055d30
20 changed files with 626 additions and 113 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue