[glib/th/gdbus-slice-alloc: 10/11] gdbus: use slice allocator for SignalInstance
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/th/gdbus-slice-alloc: 10/11] gdbus: use slice allocator for SignalInstance
- Date: Mon, 29 Mar 2021 06:28:20 +0000 (UTC)
commit fa49e460c82209b2518354f0d402280f7d790dbe
Author: Thomas Haller <thaller redhat com>
Date: Sun Mar 28 09:12:45 2021 +0200
gdbus: use slice allocator for SignalInstance
gio/gdbusconnection.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 9f00f0dd6..5aab37c22 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -3807,7 +3807,7 @@ signal_instance_free (SignalInstance *signal_instance)
g_object_unref (signal_instance->message);
g_object_unref (signal_instance->connection);
signal_subscriber_unref (signal_instance->subscriber);
- g_free (signal_instance);
+ g_slice_free (SignalInstance, signal_instance);
}
static gboolean
@@ -3927,7 +3927,7 @@ schedule_callbacks (GDBusConnection *connection,
GSource *idle_source;
SignalInstance *signal_instance;
- signal_instance = g_new0 (SignalInstance, 1);
+ signal_instance = g_slice_new0 (SignalInstance);
signal_instance->subscriber = signal_subscriber_ref (subscriber);
signal_instance->message = g_object_ref (message);
signal_instance->connection = g_object_ref (connection);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]