I've got some leak fixes for nautilus. Ok to commit these?

Author: Alexander Larsson <[email protected]>
Date:   Fri Mar 25 16:14:46 2011 +0100

    Don't leak sidebar widgets
    
    Sidebar widgets are normal widgets these days and should be standard
    floating stuff owned by the container they end up with. So, we
    should no longer ref_sink them.

diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index cfccaa8..ed8addf 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -3350,7 +3350,6 @@ nautilus_places_sidebar_new (NautilusWindow *window)
        
        sidebar = g_object_new (nautilus_places_sidebar_get_type (), NULL);
        nautilus_places_sidebar_set_parent_window (sidebar, window);
-       g_object_ref_sink (sidebar);
 
        return GTK_WIDGET (sidebar);
 }
diff --git a/src/nautilus-tree-sidebar.c b/src/nautilus-tree-sidebar.c
index cc38574..f441210 100644
--- a/src/nautilus-tree-sidebar.c
+++ b/src/nautilus-tree-sidebar.c
@@ -1639,7 +1639,6 @@ nautilus_tree_sidebar_new (NautilusWindow *window)
        
        sidebar = g_object_new (fm_tree_view_get_type (), NULL);
        fm_tree_view_set_parent_window (sidebar, window);
-       g_object_ref_sink (sidebar);
 
        return GTK_WIDGET (sidebar);
 }





Author: Alexander Larsson <[email protected]>
Date:   Fri Mar 25 16:14:28 2011 +0100

    Don't leak NautilusFile for bookmarks in places sidebar

diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index 0d032e3..cfccaa8 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -616,6 +616,7 @@ update_places (NautilusPlacesSidebar *sidebar)
                        nautilus_file_unref (file);
                        continue;
                }
+               nautilus_file_unref (file);
 
                bookmark_name = nautilus_bookmark_get_name (bookmark);
                icon = nautilus_bookmark_get_icon (bookmark);


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       [email protected]            [email protected] 
He's an otherworldly day-dreaming rock star with no name. She's a 
chain-smoking tomboy hooker with a song in her heart and a spring in her step. 
They fight crime! 

-- 
nautilus-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/nautilus-list

Reply via email to