Author: bugman Date: Tue Feb 3 18:09:35 2015 New Revision: 27492 URL: http://svn.gna.org/viewcvs/relax?rev=27492&view=rev Log: Popup menus are now properly destroyed in the GUI tests. In many instances, the wx.Menu.Destroy() method was only being called when the GUI is shown. This causes memory leaking in the GUI tests. Modified: trunk/gui/components/base_list.py trunk/gui/controller.py trunk/gui/spin_viewer/tree.py Modified: trunk/gui/components/base_list.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/components/base_list.py?rev=27492&r1=27491&r2=27492&view=diff ============================================================================== --- trunk/gui/components/base_list.py (original) +++ trunk/gui/components/base_list.py Tue Feb 3 18:09:35 2015 @@ -371,7 +371,9 @@ # Pop up the menu. if status.show_gui: self.element.PopupMenu(menu) - menu.Destroy() + + # Cleanup. + menu.Destroy() def resize(self, event): Modified: trunk/gui/controller.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/controller.py?rev=27492&r1=27491&r2=27492&view=diff ============================================================================== --- trunk/gui/controller.py (original) +++ trunk/gui/controller.py Tue Feb 3 18:09:35 2015 @@ -1,7 +1,7 @@ ############################################################################### # # # Copyright (C) 2009 Michael Bieri # -# Copyright (C) 2010-2014 Edward d'Auvergne # +# Copyright (C) 2010-2015 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -1131,7 +1131,9 @@ # Pop up the menu. if status.show_gui: self.PopupMenu(menu) - menu.Destroy() + + # Cleanup. + menu.Destroy() def write(self): Modified: trunk/gui/spin_viewer/tree.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/spin_viewer/tree.py?rev=27492&r1=27491&r2=27492&view=diff ============================================================================== --- trunk/gui/spin_viewer/tree.py (original) +++ trunk/gui/spin_viewer/tree.py Tue Feb 3 18:09:35 2015 @@ -541,7 +541,9 @@ # Show the menu. if status.show_gui: self.PopupMenu(menu) - menu.Destroy() + + # Cleanup. + menu.Destroy() def menu_molecule(self): @@ -592,7 +594,9 @@ # Show the menu. if status.show_gui: self.PopupMenu(menu) - menu.Destroy() + + # Cleanup. + menu.Destroy() def menu_residue(self): @@ -645,7 +649,9 @@ # Show the menu. if status.show_gui: self.PopupMenu(menu) - menu.Destroy() + + # Cleanup. + menu.Destroy() def menu_root(self): @@ -674,7 +680,9 @@ # Show the menu. if status.show_gui: self.PopupMenu(menu) - menu.Destroy() + + # Cleanup. + menu.Destroy() def menu_spin(self): @@ -725,7 +733,9 @@ # Show the menu. if status.show_gui: self.PopupMenu(menu) - menu.Destroy() + + # Cleanup. + menu.Destroy() def prune_mol(self):