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:
parent
f55211ae0d
commit
db9dcbddbc
3 changed files with 27 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue