gtk-demo: Plug another leak
authorMatthias Clasen <mclasen@redhat.com>
Thu, 21 May 2020 20:24:20 +0000 (16:24 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 21 May 2020 20:24:20 +0000 (16:24 -0400)
We were leaking the builder in the css blendmodes demo,
by creating a ref cycle. This was showing up as
the list entry not going back to upright after
closing the window.

demos/gtk-demo/css_blendmodes.c

index 3ddbbc0c37c172c171cc24ee099f5681dd7a4516..df791aad3102c82a5edef388c8ba3eb0f80a0d25 100644 (file)
@@ -134,6 +134,8 @@ do_css_blendmodes (GtkWidget *do_widget)
                                                   GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 
       setup_listbox (builder, provider);
+
+      g_object_unref (builder);
     }
 
   if (!gtk_widget_get_visible (window))