Commit 7678b9a0 authored by Zeeshan Ali's avatar Zeeshan Ali

service-manager: Free/unref stuff when destroyed

parent 66a6830e
......@@ -111,6 +111,18 @@ gclue_service_manager_handle_get_client (GClueServiceManager *manager,
return TRUE;
}
static void
gclue_service_manager_finalize (GObject *object)
{
GClueServiceManagerPrivate *priv = GCLUE_SERVICE_MANAGER (object)->priv;
g_clear_object (&priv->connection);
g_clear_pointer (&priv->clients, g_hash_table_unref);
/* Chain up to the parent class */
G_OBJECT_CLASS (gclue_service_manager_parent_class)->finalize (object);
}
static void
gclue_service_manager_get_property (GObject *object,
guint prop_id,
......@@ -154,6 +166,7 @@ gclue_service_manager_class_init (GClueServiceManagerClass *klass)
GObjectClass *object_class;
object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gclue_service_manager_finalize;
object_class->get_property = gclue_service_manager_get_property;
object_class->set_property = gclue_service_manager_set_property;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment