[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 02/06: Fix memory leak when recreating window.

noreply at xfce.org noreply at xfce.org
Tue Apr 17 15:02:35 CEST 2018


This is an automated email from the git hooks/post-receive script.

g   o   t   t   c   o   d   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-whiskermenu-plugin.

commit fc7709cb3d7d942ba31c7ec3df4fa88c3c2b4212
Author: Graeme Gott <graeme at gottcode.org>
Date:   Mon Apr 16 20:43:13 2018 -0400

    Fix memory leak when recreating window.
---
 panel-plugin/command.cpp       | 4 +++-
 panel-plugin/launcher-view.cpp | 3 ++-
 panel-plugin/page.cpp          | 3 ++-
 panel-plugin/window.cpp        | 1 +
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/command.cpp b/panel-plugin/command.cpp
index 06136f9..18d6ba6 100644
--- a/panel-plugin/command.cpp
+++ b/panel-plugin/command.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2016 Graeme Gott <graeme at gottcode.org>
+ * Copyright (C) 2013, 2016, 2018 Graeme Gott <graeme at gottcode.org>
  *
  * This library is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -56,10 +56,12 @@ Command::~Command()
 {
 	if (m_button)
 	{
+		gtk_widget_destroy(m_button);
 		g_object_unref(m_button);
 	}
 	if (m_menuitem)
 	{
+		gtk_widget_destroy(m_menuitem);
 		g_object_unref(m_menuitem);
 	}
 
diff --git a/panel-plugin/launcher-view.cpp b/panel-plugin/launcher-view.cpp
index d1fbc3d..dd4366d 100644
--- a/panel-plugin/launcher-view.cpp
+++ b/panel-plugin/launcher-view.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2016 Graeme Gott <graeme at gottcode.org>
+ * Copyright (C) 2013, 2016, 2018 Graeme Gott <graeme at gottcode.org>
  *
  * This library is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -88,6 +88,7 @@ LauncherView::~LauncherView()
 {
 	m_model = NULL;
 
+	gtk_widget_destroy(GTK_WIDGET(m_view));
 	g_object_unref(m_view);
 }
 
diff --git a/panel-plugin/page.cpp b/panel-plugin/page.cpp
index 32cb845..afa736e 100644
--- a/panel-plugin/page.cpp
+++ b/panel-plugin/page.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2014, 2015, 2016, 2017 Graeme Gott <graeme at gottcode.org>
+ * Copyright (C) 2013, 2014, 2015, 2016, 2017, 2018 Graeme Gott <graeme at gottcode.org>
  *
  * This library is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -61,6 +61,7 @@ Page::~Page()
 	}
 
 	delete m_view;
+	gtk_widget_destroy(m_widget);
 	g_object_unref(m_widget);
 }
 
diff --git a/panel-plugin/window.cpp b/panel-plugin/window.cpp
index c1b2ace..23a5049 100644
--- a/panel-plugin/window.cpp
+++ b/panel-plugin/window.cpp
@@ -273,6 +273,7 @@ WhiskerMenu::Window::~Window()
 	delete m_favorites_button;
 	delete m_recent_button;
 
+	gtk_widget_destroy(GTK_WIDGET(m_window));
 	g_object_unref(m_window);
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list