[libhandy] window-mixin: Correctly destroy the children
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy] window-mixin: Correctly destroy the children
- Date: Fri, 4 Sep 2020 08:59:52 +0000 (UTC)
commit 029787e4f60b60d662a90ef8a6308e5b23977e68
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Sep 2 00:40:56 2020 +0500
window-mixin: Correctly destroy the children
Fix a memory leak.
Signed-off-by: Alexander Mikhaylenko <alexm gnome org>
src/hdy-window-mixin.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/src/hdy-window-mixin.c b/src/hdy-window-mixin.c
index d240202a..871a54c2 100644
--- a/src/hdy-window-mixin.c
+++ b/src/hdy-window-mixin.c
@@ -470,13 +470,9 @@ hdy_window_mixin_draw (HdyWindowMixin *self,
void
hdy_window_mixin_destroy (HdyWindowMixin *self)
{
- if (self->titlebar) {
- hdy_window_mixin_remove (self, self->titlebar);
- self->titlebar = NULL;
- }
-
if (self->content) {
hdy_window_mixin_remove (self, self->content);
+ gtk_widget_destroy (self->content);
self->content = NULL;
self->child = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]