gst-examples: drop use of GSlice allocator

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
This commit is contained in:
Tim-Philipp Müller 2023-01-24 20:20:41 +00:00 committed by GStreamer Marge Bot
parent 8a047a619e
commit 06e9d78ade
3 changed files with 6 additions and 6 deletions

View file

@ -76,7 +76,7 @@ remove_client (Client * client)
g_object_unref (client->connection); g_object_unref (client->connection);
g_byte_array_unref (client->current_message); g_byte_array_unref (client->current_message);
g_slice_free (Client, client); g_free (client);
} }
static void static void
@ -270,7 +270,7 @@ static gboolean
on_new_connection (GSocketService * service, GSocketConnection * connection, on_new_connection (GSocketService * service, GSocketConnection * connection,
GObject * source_object, gpointer user_data) GObject * source_object, gpointer user_data)
{ {
Client *client = g_slice_new0 (Client); Client *client = g_new0 (Client, 1);
GSocketAddress *addr; GSocketAddress *addr;
GInetAddress *iaddr; GInetAddress *iaddr;
gchar *ip; gchar *ip;

View file

@ -317,7 +317,7 @@ create_receiver_entry (SoupWebsocketConnection * connection)
GstWebRTCRTPTransceiver *trans = NULL; GstWebRTCRTPTransceiver *trans = NULL;
GstBus *bus; GstBus *bus;
receiver_entry = g_slice_alloc0 (sizeof (ReceiverEntry)); receiver_entry = g_new0 (ReceiverEntry, 1);
receiver_entry->connection = connection; receiver_entry->connection = connection;
g_object_ref (G_OBJECT (connection)); g_object_ref (G_OBJECT (connection));
@ -408,7 +408,7 @@ destroy_receiver_entry (gpointer receiver_entry_ptr)
if (receiver_entry->connection != NULL) if (receiver_entry->connection != NULL)
g_object_unref (G_OBJECT (receiver_entry->connection)); g_object_unref (G_OBJECT (receiver_entry->connection));
g_slice_free1 (sizeof (ReceiverEntry), receiver_entry); g_free (receiver_entry);
} }

View file

@ -231,7 +231,7 @@ create_receiver_entry (SoupWebsocketConnection * connection)
GArray *transceivers; GArray *transceivers;
GstBus *bus; GstBus *bus;
receiver_entry = g_slice_alloc0 (sizeof (ReceiverEntry)); receiver_entry = g_new0 (ReceiverEntry, 1);
receiver_entry->connection = connection; receiver_entry->connection = connection;
g_object_ref (G_OBJECT (connection)); g_object_ref (G_OBJECT (connection));
@ -342,7 +342,7 @@ destroy_receiver_entry (gpointer receiver_entry_ptr)
if (receiver_entry->connection != NULL) if (receiver_entry->connection != NULL)
g_object_unref (G_OBJECT (receiver_entry->connection)); g_object_unref (G_OBJECT (receiver_entry->connection));
g_slice_free1 (sizeof (ReceiverEntry), receiver_entry); g_free (receiver_entry);
} }