Fix instance binding unreference callback regression

This was a regression from 4469144891

The callback should be called, not only be called when the refcount
reaches 0. For example, the C# callback needs to know when the
refcount reaches 1, in order to swap to a weak GC handle.
This commit is contained in:
Ignacio Roldán Etcheverry 2022-08-12 08:38:33 +02:00
parent c2eaaef149
commit f45f20285c

View file

@ -85,7 +85,8 @@ bool RefCounted::unreference() {
_get_extension()->unreference(_get_extension_instance());
}
die = die && _instance_binding_reference(false);
bool binding_ret = _instance_binding_reference(false);
die = die && binding_ret;
}
return die;