[nautilus] window: plug memory leak



commit 40a709cc11f60a47a0d956ea39af15e45d4339e3
Author: Carlos Soriano <csoriano gnome org>
Date:   Wed Sep 9 14:26:41 2015 +0200

    window: plug memory leak

 src/nautilus-window.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index bd9657b..da28b52 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1159,6 +1159,9 @@ places_sidebar_populate_popup_cb (GtkPlacesSidebar *sidebar,
         GtkWidget *menu_item;
         GAction *action;
 
+       g_clear_object (&window->priv->selected_file);
+       g_clear_object (&window->priv->selected_volume);
+
        if (selected_file) {
                trash = g_file_new_for_uri ("trash:///");
                if (g_file_equal (trash, selected_file)) {
@@ -2121,6 +2124,9 @@ nautilus_window_finalize (GObject *object)
                 window->priv->notification_operation_timeout_id = 0;
        }
 
+       g_clear_object (&window->priv->selected_file);
+       g_clear_object (&window->priv->selected_volume);
+
        g_signal_handlers_disconnect_by_func (nautilus_file_undo_manager_get (),
                                               G_CALLBACK (nautilus_window_on_undo_changed),
                                               window);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]