[gtk/expander-ref-leak] Release an extra reference on GtkExpander:child
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/expander-ref-leak] Release an extra reference on GtkExpander:child
- Date: Tue, 24 Aug 2021 00:14:33 +0000 (UTC)
commit 237d2b8012c4e3db18a829d08f42309185016800
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Aug 24 01:11:15 2021 +0100
Release an extra reference on GtkExpander:child
The child of a GtkExpander is owned directly by the expander whenever
the "expanded" flag is unset. If a GtkExpander is disposed while not
expanded, we need to explicitly release the reference on the child
widget that we own.
gtk/gtkexpander.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index 00b9a52e38..bbe43eb255 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -582,6 +582,9 @@ gtk_expander_dispose (GObject *object)
expander->expand_timer = 0;
}
+ if (!expander->expanded)
+ g_clear_object (&expander->child);
+
if (expander->box)
{
gtk_widget_unparent (expander->box);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]