You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
Forward refcount changes to NativeScriptInstance
This also changes Reference::unreference() to always invoke refcount_decremented. Previously it was not invoked until the count reached zero due to short-circuit evalution of boolean expressions.
This commit is contained in:
@@ -74,7 +74,8 @@ bool Reference::unreference() {
|
||||
bool die = refcount.unref();
|
||||
|
||||
if (get_script_instance()) {
|
||||
die = die && get_script_instance()->refcount_decremented();
|
||||
bool script_ret = get_script_instance()->refcount_decremented();
|
||||
die = die && script_ret;
|
||||
}
|
||||
|
||||
return die;
|
||||
|
||||
Reference in New Issue
Block a user