[nautilus/wip/antoniof/meets-valgrind: 2/11] window-slot: Don't leak menus on destruction
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/meets-valgrind: 2/11] window-slot: Don't leak menus on destruction
- Date: Mon, 21 Dec 2020 18:35:03 +0000 (UTC)
commit abc34c24d7ff32fa83d9f90762725369b976c0b4
Author: António Fernandes <antoniof gnome org>
Date: Sat Dec 19 21:45:57 2020 +0000
window-slot: Don't leak menus on destruction
We hold a ref since commit 6b16de613dc87b9f84d87a46ac5987b6d7087a5c
But we never release it on slot destruction, so it leaks.
Release it on destruction.
src/nautilus-window-slot.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 32a3590a3..c443d2c89 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -3118,6 +3118,9 @@ nautilus_window_slot_dispose (GObject *object)
g_clear_pointer (&priv->extensions_background_menu_binding, g_binding_unbind);
g_clear_pointer (&priv->templates_menu_binding, g_binding_unbind);
+ g_clear_object (&priv->templates_menu);
+ g_clear_object (&priv->extensions_background_menu);
+
if (priv->content_view)
{
gtk_widget_destroy (GTK_WIDGET (priv->content_view));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]