[libhandy] preferences-group: Fix a leak in dispose()
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy] preferences-group: Fix a leak in dispose()
- Date: Thu, 17 Dec 2020 13:44:30 +0000 (UTC)
commit b98974f06ce4773efd5bf54d728cbd780d3d1254
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Dec 17 13:06:51 2020 +0500
preferences-group: Fix a leak in dispose()
Long ago we were subclassing GtkBox and all these widgets were internal.
Since then we switched to subclassing GtkBin and including a box, and never
updated this function, causing a leak.
src/hdy-preferences-group.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/hdy-preferences-group.c b/src/hdy-preferences-group.c
index 80006274..92b2e3b7 100644
--- a/src/hdy-preferences-group.c
+++ b/src/hdy-preferences-group.c
@@ -180,12 +180,13 @@ hdy_preferences_group_dispose (GObject *object)
/*
* Since we overload forall(), the inherited destroy() won't work as normal.
- * Remove internal widgets ourself.
+ * Remove internal widgets ourselves.
*/
- g_clear_pointer ((GtkWidget **) &priv->description, gtk_widget_destroy);
- g_clear_pointer ((GtkWidget **) &priv->listbox, gtk_widget_destroy);
- g_clear_pointer ((GtkWidget **) &priv->listbox_box, gtk_widget_destroy);
- g_clear_pointer ((GtkWidget **) &priv->title, gtk_widget_destroy);
+ g_clear_pointer ((GtkWidget **) &priv->box, gtk_widget_destroy);
+ priv->description = NULL;
+ priv->listbox = NULL;
+ priv->listbox_box = NULL;
+ priv->title = NULL;
G_OBJECT_CLASS (hdy_preferences_group_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]