mailr27480 - /trunk/gui/spin_viewer/frame.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 - 16:38:
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")




Related Messages


Powered by MHonArc, Updated Tue Feb 03 17:00:04 2015