Menu

Commit [r27511]  Maximize  Restore  History

Large memory management improvement for the relax GUI wizards and GUI user functions.

The pympler.muppy based memory management scripts in devel_scripts/memory_management for testing the
GUI user function windows was showing that for each GUI user function call, 28 wx._core.BoxSizer
elements were remaining in memory. This was traced back to the gui.wizards.wiz_objects.Wiz_window
class, specifically the self._page_sizers and self._button_sizers lists storing wx.BoxSizer
instances.

The problem was that 16 page sizers and 16 button sizers were initialised each time for later use,
however the add_page() method only added a small subset of these to the self._main_sizer wx.BoxSizer
object. But the Destroy() method was only capable of destroying the wx.BoxSizer instances
associated with another wxPython object. The fix was to add all page and button sizers to the
self._main_sizer object upon initialisation.

This will solve many memory issues in the GUI, especially in the GUI tests on Mac OS X systems
causing 'memory error' or 'bus error' messages and on MS Windows due to 'USER Object' and 'GDI
object' limitations.

bugman 2015-02-04

changed /trunk/gui/wizards/wiz_objects.py
/trunk/gui/wizards/wiz_objects.py Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.