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)


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to