From 7eaf231e566e8a8470589e743bac10475c1ce987 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 24 Jun 2012 02:26:39 -0400 Subject: [PATCH] st-theme-node: Don't hold a ref to the theme context or the theme This would just be a circular reference, which we need to avoid. https://bugzilla.gnome.org/show_bug.cgi?id=678737 --- src/st/st-theme-node.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/st/st-theme-node.c b/src/st/st-theme-node.c index 765a3ee66..27a59f142 100644 --- a/src/st/st-theme-node.c +++ b/src/st/st-theme-node.c @@ -67,18 +67,6 @@ st_theme_node_dispose (GObject *gobject) { StThemeNode *node = ST_THEME_NODE (gobject); - if (node->context) - { - g_object_unref (node->context); - node->context = NULL; - } - - if (node->theme) - { - g_object_unref (node->theme); - node->theme = NULL; - } - if (node->parent_node) { g_object_unref (node->parent_node); @@ -194,7 +182,7 @@ st_theme_node_new (StThemeContext *context, node = g_object_new (ST_TYPE_THEME_NODE, NULL); - node->context = g_object_ref (context); + node->context = context; if (parent_node != NULL) node->parent_node = g_object_ref (parent_node); else @@ -204,7 +192,7 @@ st_theme_node_new (StThemeContext *context, theme = parent_node->theme; if (theme != NULL) - node->theme = g_object_ref (theme); + node->theme = theme; node->element_type = element_type; node->element_id = g_strdup (element_id);