mailr27474 - /trunk/gui/analyses/auto_relax_disp.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:47:
Author: bugman
Date: Tue Feb  3 15:47:46 2015
New Revision: 27474

URL: http://svn.gna.org/viewcvs/relax?rev=27474&view=rev
Log:
Improved memory management in the relaxation dispersion GUI analysis.

The peak intensity loading wizard is now properly destroyed.  This is both 
via the delete() function
for terminating the analysis calling the wizard Delete() method, and in the 
peak_wizard_launch()
method calling the wizard Delete() method prior to overwriting the 
self.peak_wizard object with a
new GUI wizard.


Modified:
    trunk/gui/analyses/auto_relax_disp.py

Modified: trunk/gui/analyses/auto_relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/analyses/auto_relax_disp.py?rev=27474&r1=27473&r2=27474&view=diff
==============================================================================
--- trunk/gui/analyses/auto_relax_disp.py       (original)
+++ trunk/gui/analyses/auto_relax_disp.py       Tue Feb  3 15:47:46 2015
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2013-2014 Edward d'Auvergne                                  
 #
+# Copyright (C) 2013-2015 Edward d'Auvergne                                  
 #
 # Copyright (C) 2014 Troels E. Linnet                                        
 #
 #                                                                            
 #
 # This file is part of the program relax (http://www.nmr-relax.com).         
 #
@@ -404,6 +404,11 @@
         # Clean up the peak intensity object.
         self.peak_intensity.delete()
 
+        # Destroy the peak intensity wizard, if it exists.
+        if hasattr(self, 'peak_wizard'):
+            self.peak_wizard.Destroy()
+            del self.peak_wizard
+
 
     def execute(self, event):
         """Set up, execute, and process the automatic Rx analysis.
@@ -522,6 +527,10 @@
         @param event:   The wx event.
         @type event:    wx event
         """
+
+        # Destroy the peak intensity wizard, if it exists.
+        if hasattr(self, 'peak_wizard'):
+            self.peak_wizard.Destroy()
 
         # A new wizard instance.
         self.peak_wizard = Peak_intensity_wizard(relax_disp=True)




Related Messages


Powered by MHonArc, Updated Tue Feb 03 16:00:02 2015