mailr27469 - /trunk/gui/analyses/auto_model_free.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on February 03, 2015 - 15:16:
Author: bugman
Date: Tue Feb  3 15:16:17 2015
New Revision: 27469

URL: http://svn.gna.org/viewcvs/relax?rev=27469&view=rev
Log:
Improved memory management in the model-free GUI analysis.

The dipole-dipole interaction wizard is now properly destroyed.  This is both 
via the delete()
function for terminating the analysis calling the wizard Delete() method, and 
in the
setup_dipole_pair() method calling the wizard Delete() method prior to 
overwriting the
self.dipole_wizard object with a new GUI wizard.


Modified:
    trunk/gui/analyses/auto_model_free.py

Modified: trunk/gui/analyses/auto_model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/analyses/auto_model_free.py?rev=27469&r1=27468&r2=27469&view=diff
==============================================================================
--- trunk/gui/analyses/auto_model_free.py       (original)
+++ trunk/gui/analyses/auto_model_free.py       Tue Feb  3 15:16:17 2015
@@ -1,7 +1,7 @@
 
###############################################################################
 #                                                                            
 #
 # Copyright (C) 2009 Michael Bieri                                           
 #
-# Copyright (C) 2010-2014 Edward d'Auvergne                                  
 #
+# Copyright (C) 2010-2015 Edward d'Auvergne                                  
 #
 # Copyright (C) 2014 Troels E. Linnet                                        
 #
 #                                                                            
 #
 # This file is part of the program relax (http://www.nmr-relax.com).         
 #
@@ -562,6 +562,11 @@
         # Clean up the relaxation data list object.
         self.relax_data.delete()
 
+        # Destroy the dipole-dipole interaction wizard.
+        if hasattr(self, 'dipole_wizard'):
+            self.dipole_wizard.Destroy()
+            del self.dipole_wizard
+
 
     def execute(self, event=None):
         """Set up, execute, and process the automatic model-free protocol.
@@ -678,6 +683,10 @@
 
         # Change the cursor to busy.
         wx.BeginBusyCursor()
+
+        # Destroy the dipole-dipole interaction wizard, if it exists.
+        if hasattr(self, 'dipole_wizard'):
+            self.dipole_wizard.Destroy()
 
         # Create the wizard.
         self.dipole_wizard = Wiz_window(parent=self.gui, size_x=1000, 
size_y=750, title="Dipole-dipole interaction setup")




Related Messages


Powered by MHonArc, Updated Tue Feb 03 15:40:02 2015