On 10/8/25 08:27, Paolo Bonzini wrote:
@@ -95,7 +96,7 @@ void qobject_destroy(QObject *obj);
static inline void qobject_unref_impl(QObject *obj)
{
assert(!obj || obj->base.refcnt);
- if (obj && --obj->base.refcnt == 0) {
+ if (obj && qatomic_fetch_dec(&obj->base.refcnt) == 1) {
qatomic_dec_fetch lets you compare against 0, which makes all isa's happier. Otherwise, Reviewed-by: Richard Henderson <[email protected]> r~
