lib: add some debug statements to debug the destruction sequence

This commit is contained in:
George Kiagiadakis 2019-06-18 10:33:09 +03:00
parent 64affcaf49
commit e603ed4215
5 changed files with 12 additions and 0 deletions

View file

@ -65,6 +65,8 @@ wp_core_finalize (GObject * obj)
g_ptr_array_unref (global_objects);
g_debug ("WpCore destroyed");
G_OBJECT_CLASS (wp_core_parent_class)->finalize (obj);
}

View file

@ -151,6 +151,9 @@ wp_endpoint_finalize (GObject * object)
WpEndpointPrivate *priv =
wp_endpoint_get_instance_private (WP_ENDPOINT (object));
g_debug ("%s:%p destroyed: %s", G_OBJECT_TYPE_NAME (object), object,
priv->name);
g_ptr_array_unref (priv->streams);
g_ptr_array_unref (priv->controls);
g_ptr_array_unref (priv->links);

View file

@ -35,6 +35,8 @@ wp_policy_manager_finalize (GObject *object)
{
WpPolicyManager *self = WP_POLICY_MANAGER (object);
g_debug ("WpPolicyManager destroyed");
g_list_free_full (self->policies, g_object_unref);
G_OBJECT_CLASS (wp_policy_manager_parent_class)->finalize (object);

View file

@ -80,6 +80,9 @@ wp_proxy_finalize (GObject * object)
{
WpProxyPrivate *self = wp_proxy_get_instance_private (WP_PROXY(object));
g_debug ("%s:%p destroyed (pw proxy %p)", G_OBJECT_TYPE_NAME (object),
object, self->proxy);
/* Remove the listener */
spa_hook_remove (&self->listener);

View file

@ -45,6 +45,8 @@ wp_remote_finalize (GObject *object)
g_weak_ref_clear (&priv->core);
g_debug ("%s destroyed", G_OBJECT_TYPE_NAME (object));
G_OBJECT_CLASS (wp_remote_parent_class)->finalize (object);
}