Author: bugman
Date: Tue Feb 3 16:38:38 2015
New Revision: 27480
URL: http://svn.gna.org/viewcvs/relax?rev=27480&view=rev
Log:
Improved memory management in the spin viewer window.
The spin loading wizard is now destroyed in the Destroy() method as well as
before reinitialising
the wizard in the load_spins_wizard() method.
Modified:
trunk/gui/spin_viewer/frame.py
Modified: trunk/gui/spin_viewer/frame.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/gui/spin_viewer/frame.py?rev=27480&r1=27479&r2=27480&view=diff
==============================================================================
--- trunk/gui/spin_viewer/frame.py (original)
+++ trunk/gui/spin_viewer/frame.py Tue Feb 3 16:38:38 2015
@@ -133,6 +133,11 @@
status.observers.pipe_alteration.unregister(self.name)
status.observers.exec_lock.unregister(self.name)
+ # Destroy the spin loading wizard, if it exists.
+ if hasattr(self, 'wizard'):
+ self.wizard.Destroy()
+ del self.wizard
+
# Destroy all children of the window.
super(Spin_view_window, self).DestroyChildren()
@@ -224,6 +229,10 @@
# Change the cursor to busy.
wx.BeginBusyCursor()
+
+ # Destroy the spin loading wizard, if it exists.
+ if hasattr(self, 'wizard'):
+ self.wizard.Destroy()
# Initialise a wizard.
self.wizard = Wiz_window(parent=self, size_x=1000, size_y=800,
title="Load spins")
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
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