diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-10-03 06:04:54 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-10-03 06:04:54 +0800 |
commit | bc28c27d07ae56467c45666ba6595901a99eadbe (patch) | |
tree | b6a67e68189d9064c9008c0b4651ad7f1767841a | |
parent | bf28f9ee7e5e62ee5b31e366c8e10451f1e5a6ee (diff) | |
download | gsoc2013-epiphany-bc28c27d07ae56467c45666ba6595901a99eadbe.tar.gz 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.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/ephy-window.c | 11 |
2 files changed, 15 insertions, 3 deletions
@@ -1,5 +1,12 @@ 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. + +2005-10-03 Christian Persch <chpe@cvs.gnome.org> + * embed/ephy-embed-shell.c: (ephy_embed_shell_dispose): * src/ephy-shell.c: (ephy_shell_dispose): 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 (); |