gobject: drop ref/unref from g_object_freeze_notify()

This was done since the beginning (commit e773d7dba6 ('fixed dealing
with collection/lcopy of NULL values.'). But it's not clear, why we
would need to take a reference on the calling object.

Freeze does not emit any signals/callbacks and does not call back to the
user. It just sets up some internal state.

This doesn't require to take a reference. The caller must hold a valid
reference to being with, but if that's given, there is no need to
acquire another reference.
This commit is contained in:
Thomas Haller 2023-12-12 09:15:47 +01:00
parent 28331deae2
commit f2fafdfe06

View File

@ -1443,9 +1443,7 @@ g_object_freeze_notify (GObject *object)
}
#endif
g_object_ref (object);
g_object_notify_queue_freeze (object, FALSE);
g_object_unref (object);
}
static inline void