mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
gtestdbus: Clarify comment on dropping connection ref
In _g_object_unref_and_wait_weak_notify() we take a weak reference and then call g_object_unref() in an idle callback, which may look like we're dropping a strong reference without having one. So change the comment to make it more clear that the reference being dropped is held by the caller.
This commit is contained in:
parent
59ce6b10dc
commit
d4db5a8288
@ -84,8 +84,9 @@ _g_object_unref_and_wait_weak_notify (gpointer object)
|
||||
|
||||
g_object_weak_ref (object, (GWeakNotify) g_main_loop_quit, data.loop);
|
||||
|
||||
/* Drop the ref in an idle callback, this is to make sure the mainloop
|
||||
* is already running when weak notify happens */
|
||||
/* Drop the strong ref held by the caller in an idle callback. This is to
|
||||
* make sure the mainloop is already running when weak notify happens (when
|
||||
* all other strong ref holders have dropped theirs). */
|
||||
g_idle_add (unref_on_idle, object);
|
||||
|
||||
/* Make sure we don't block forever */
|
||||
|
Loading…
Reference in New Issue
Block a user