[glade] Plug a placeholder leak in the box adaptor



commit 4d7c3d5f465304d6bb715d5101f5058911bc8ed9
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Nov 6 18:04:18 2014 -0500

    Plug a placeholder leak in the box adaptor
    
    gtk_widget_destroy() is not the right counterpart for
    g_object_ref(), and it is useless anyway to do a ref-unref
    pair around gtk_container_remove(), so just drop this.
    
    This fix makes the placeholder instance count go down again
    when shrinking the size of a box.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=739751

 plugins/gtk+/glade-gtk-box.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/plugins/gtk+/glade-gtk-box.c b/plugins/gtk+/glade-gtk-box.c
index c29ec75..8b9d228 100644
--- a/plugins/gtk+/glade-gtk-box.c
+++ b/plugins/gtk+/glade-gtk-box.c
@@ -362,9 +362,7 @@ glade_gtk_box_set_size (GObject * object, const GValue * value)
           GLADE_IS_PLACEHOLDER (child_widget) == FALSE)
         continue;
 
-      g_object_ref (G_OBJECT (child_widget));
       gtk_container_remove (GTK_CONTAINER (box), child_widget);
-      gtk_widget_destroy (child_widget);
       old_size--;
     }
   g_list_free (children);


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