[gtk/matthiasc/for-master: 30/30] gtk-demo: Plug a memory leak



commit e87bc3d33dacbf7d8a84ed3e10d8e2d5651d12a7
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed May 13 17:24:57 2020 -0400

    gtk-demo: Plug a memory leak
    
    This leak was there all along. But with the new
    gtk_window_destroy(), it shows up as an unclosable
    window. Very noticable.

 demos/gtk-demo/iconscroll.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/demos/gtk-demo/iconscroll.c b/demos/gtk-demo/iconscroll.c
index e53e06c2e3..7f9a43d20b 100644
--- a/demos/gtk-demo/iconscroll.c
+++ b/demos/gtk-demo/iconscroll.c
@@ -218,6 +218,8 @@ do_iconscroll (GtkWidget *do_widget)
       hadjustment = GTK_ADJUSTMENT (gtk_builder_get_object (builder, "hadjustment"));
       vadjustment = GTK_ADJUSTMENT (gtk_builder_get_object (builder, "vadjustment"));
       set_widget_type (0);
+
+      g_object_unref (builder);
     }
 
   if (!gtk_widget_get_visible (window))


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