[gtk+] gtk3-demo: Don't leak in the sizegroup example



commit 758734a8c5e3006d50862d272a1b78e967c7f236
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue May 13 15:50:23 2014 -0400

    gtk3-demo: Don't leak in the sizegroup example
    
    Nobody was cleaning up the size group.
    Pointed out in
    https://bugzilla.gnome.org/show_bug.cgi?id=645966

 demos/gtk-demo/sizegroup.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/demos/gtk-demo/sizegroup.c b/demos/gtk-demo/sizegroup.c
index c15b78b..e383401 100644
--- a/demos/gtk-demo/sizegroup.c
+++ b/demos/gtk-demo/sizegroup.c
@@ -120,6 +120,7 @@ do_sizegroup (GtkWidget *do_widget)
       gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
 
       size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+      g_object_set_data_full (G_OBJECT (window), "size-group", size_group, g_object_unref);
 
       /* Create one frame holding color options */
       frame = gtk_frame_new ("Color Options");


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