[tracker/sam/tracker-3.0-functional-tests: 82/89] libtracker-direct: Unref data manager after we free all notifiers
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sam/tracker-3.0-functional-tests: 82/89] libtracker-direct: Unref data manager after we free all notifiers
- Date: Mon, 27 Jan 2020 21:19:32 +0000 (UTC)
commit ec4cb322bc77062169bea419761543217b91c226
Author: Sam Thursfield <sam afuera me uk>
Date: Wed Jan 22 01:18:50 2020 +0100
libtracker-direct: Unref data manager after we free all notifiers
The detach_notifier() function accesses the priv->data_manager object.
We can't free priv->data_manager in tracker_direct_connetion_dispose()
because we later call detach_notifier().
There doesn't seem to be a ref cycle being broken here, so I moved the
priv->data_manager free later on.
src/libtracker-direct/tracker-direct.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-direct/tracker-direct.c b/src/libtracker-direct/tracker-direct.c
index 1009701dc..592ea40fd 100644
--- a/src/libtracker-direct/tracker-direct.c
+++ b/src/libtracker-direct/tracker-direct.c
@@ -524,11 +524,6 @@ tracker_direct_connection_dispose (GObject *object)
priv->select_pool = NULL;
}
- if (priv->data_manager) {
- tracker_data_manager_shutdown (priv->data_manager);
- g_clear_object (&priv->data_manager);
- }
-
G_OBJECT_CLASS (tracker_direct_connection_parent_class)->dispose (object);
}
@@ -550,6 +545,11 @@ tracker_direct_connection_finalize (GObject *object)
detach_notifier (conn, notifier);
}
+ if (priv->data_manager) {
+ tracker_data_manager_shutdown (priv->data_manager);
+ g_clear_object (&priv->data_manager);
+ }
+
g_clear_object (&priv->store);
g_clear_object (&priv->ontology);
g_clear_object (&priv->namespace_manager);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]