mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 02:36:19 +01:00
gdbusconnection: Add a comment explaining why an invocation is ‘leaked’
It’s not leaked, it’s transferred forwards to the eventual `g_dbus_method_invocation_return_*()` call. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3559
This commit is contained in:
parent
60e9deb2b0
commit
1b66bf4122
@ -5950,6 +5950,11 @@ register_with_closures_on_method_call (GDBusConnection *connection,
|
||||
g_value_set_variant (¶ms[5], parameters);
|
||||
|
||||
g_value_init (¶ms[6], G_TYPE_DBUS_METHOD_INVOCATION);
|
||||
/* NOTE: This is deliberately *not* g_value_take_object(). A reference to
|
||||
* `invocation` is transferred in to this function, and it needs to be
|
||||
* transferred onwards to the `g_dbus_method_invocation_return_*()` method
|
||||
* call which must eventually happen (either in the closure function, or in
|
||||
* a delayed consequence from it). Changing this will break API. */
|
||||
g_value_set_object (¶ms[6], invocation);
|
||||
|
||||
g_closure_invoke (data->method_call_closure, NULL, G_N_ELEMENTS (params), params, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user