[nautilus] files-view: don't hold a ref to the view on templates items



commit a4d1583c1de1e322cb471158fccf7a6d27bd33b0
Author: Carlos Soriano <csoriano gnome org>
Date:   Thu Nov 26 17:35:54 2015 +0100

    files-view: don't hold a ref to the view on templates items
    
    They shouldn't need to hold a ref to the whole view and makes
    ownership management more complex.

 src/nautilus-files-view.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index d17bb83..9e55a3f 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1022,7 +1022,6 @@ create_template_parameters_new (NautilusFile      *file,
         CreateTemplateParameters *result;
 
         result = g_new0 (CreateTemplateParameters, 1);
-        g_object_ref (directory_view);
         result->directory_view = directory_view;
         nautilus_file_ref (file);
         result->file = file;
@@ -1033,7 +1032,6 @@ create_template_parameters_new (NautilusFile      *file,
 static void
 create_templates_parameters_free (CreateTemplateParameters *parameters)
 {
-        g_object_unref (parameters->directory_view);
         nautilus_file_unref (parameters->file);
         g_free (parameters);
 }


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