aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-10-03 06:04:54 +0800
committerChristian Persch <chpe@src.gnome.org>2005-10-03 06:04:54 +0800
commitbc28c27d07ae56467c45666ba6595901a99eadbe (patch)
treeb6a67e68189d9064c9008c0b4651ad7f1767841a /src
parentbf28f9ee7e5e62ee5b31e366c8e10451f1e5a6ee (diff)
downloadgsoc2013-epiphany-bc28c27d07ae56467c45666ba6595901a99eadbe.tar
gsoc2013-epiphany-bc28c27d07ae56467c45666ba6595901a99eadbe.tar.gz
gsoc2013-epiphany-bc28c27d07ae56467c45666ba6595901a99eadbe.tar.bz2
gsoc2013-epiphany-bc28c27d07ae56467c45666ba6595901a99eadbe.tar.lz
gsoc2013-epiphany-bc28c27d07ae56467c45666ba6595901a99eadbe.tar.xz
gsoc2013-epiphany-bc28c27d07ae56467c45666ba6595901a99eadbe.tar.zst
gsoc2013-epiphany-bc28c27d07ae56467c45666ba6595901a99eadbe.zip
Fix memory leak.
2005-10-03 Christian Persch <chpe@cvs.gnome.org> * src/ephy-window.c: (setup_ui_manager), (ephy_window_dispose), (ephy_window_finalize): Fix memory leak.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-window.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 3716b32ed..04fa156b9 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1127,6 +1127,8 @@ setup_ui_manager (EphyWindow *window)
window);
gtk_ui_manager_insert_action_group (manager, action_group, 0);
window->priv->action_group = action_group;
+ g_object_unref (action_group);
+
action = gtk_action_group_get_action (action_group, "FileOpen");
g_object_set (action, "short_label", _("Open"), NULL);
action = gtk_action_group_get_action (action_group, "FileSaveAs");
@@ -1154,6 +1156,7 @@ setup_ui_manager (EphyWindow *window)
G_N_ELEMENTS (ephy_popups_entries), window);
gtk_ui_manager_insert_action_group (manager, action_group, 0);
window->priv->popups_action_group = action_group;
+ g_object_unref (action_group);
window->priv->manager = manager;
g_signal_connect (manager, "add_widget", G_CALLBACK (add_widget), window);
@@ -2508,6 +2511,8 @@ ephy_window_dispose (GObject *object)
eel_gconf_notification_remove (priv->browse_with_caret_notifier_id);
eel_gconf_notification_remove (priv->allow_popups_notifier_id);
+ priv->browse_with_caret_notifier_id = 0;
+ priv->allow_popups_notifier_id = 0;
if (priv->idle_resize_handler != 0)
{
@@ -2534,9 +2539,9 @@ ephy_window_dispose (GObject *object)
g_object_unref (priv->ppview_toolbar);
priv->ppview_toolbar = NULL;
}
-
- g_object_unref (priv->action_group);
+
priv->action_group = NULL;
+ priv->popups_action_group = NULL;
g_object_unref (priv->manager);
priv->manager = NULL;
@@ -3042,7 +3047,7 @@ ephy_window_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
- LOG ("Ephy Window finalized %p", object);
+ LOG ("EphyWindow finalised %p", object);
#ifdef ENABLE_PYTHON
ephy_python_schedule_gc ();