mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 01:58:54 +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:
		@@ -5951,6 +5951,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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user