Author: bugman Date: Tue Feb 3 15:09:16 2015 New Revision: 27467 URL: http://svn.gna.org/viewcvs/relax?rev=27467&view=rev Log: Improved memory management in the relaxation curve-fitting 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_rx_base.py Modified: trunk/gui/analyses/auto_rx_base.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/analyses/auto_rx_base.py?rev=27467&r1=27466&r2=27467&view=diff ============================================================================== --- trunk/gui/analyses/auto_rx_base.py (original) +++ trunk/gui/analyses/auto_rx_base.py Tue Feb 3 15:09:16 2015 @@ -276,6 +276,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. @@ -348,6 +353,10 @@ @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_fit=True)