The original problem rises on win XP and also Linux (checked Ubuntu and Kubuntu) in version 2.9. and 2.8.
Adding the suggested self._aui_mgr.Destroy() does resolve the problem and the test program stops leaking.
after creating the aui manager. When this is set I can no longer Destroy() the manager, but there is also no leak. I’ve now added UnInint() to the Destroy of all my AuiManger() and Indeed most of the leaks are gone.
The following code shows my current leak. I use the notebook’s GetAuiManager() and UnInit() it myself. This works well, unless I add a page. In this case there is a leak, even if I explicitly DeletePage() it.
···
On Tuesday, March 6, 2012 4:11:52 PM UTC+2, Oren wrote:
I’m having a memory leakage problem using agw.aui.AuiManager.
I’ve created a stripped down sample that shows the leak - listed below.
I’m creating a panel and destroying it repeatedly. Memory usage grows and after a short while the application fires he following assertion error:
wx._core.PyAssertionError: C++ assertion “IsOk()” failed at …..\src\common\image.cpp(1506) in wxIm
age::Replace(): invalid image
I’m calling UnInit() to release the aui manager as described in the doc.
When removing the creation the AuiManager (and the UnInit() ) there is no leakage.
I’m using wx ver:2.9.3.1, but I’m suspecting it happens in ver 2.8.1 as well.
I would appreciate any thought on this.
Thanks,
Oren
import wx
from wx.lib.agw import aui
class MyPanel(wx.Panel):
def init(self, parent):
wx.Panel.init(self, parent)
self._aui_mgr = aui.AuiManager()
def Destroy(self):
self._aui_mgr.UnInit()
wx.Panel.Destroy(self)
class MainWindow(wx.Frame):
def init(self):
wx.Frame.init(self, parent=None)
self.Show(True)
self.Bind(wx.EVT_TIMER, self._on_timer)
self._timer = wx.Timer(self)
self._timer.Start(100)
def _on_timer(self, event):
new_panel = MyPanel(self)
new_panel.Destroy()
def main():
app = wx.App()
mw = MainWindow()
app.MainLoop()
if name == ‘main’:
main()
On Tuesday, March 6, 2012 4:11:52 PM UTC+2, Oren wrote:
I’m having a memory leakage problem using agw.aui.AuiManager.
I’ve created a stripped down sample that shows the leak - listed below.
I’m creating a panel and destroying it repeatedly. Memory usage grows and after a short while the application fires he following assertion error:
wx._core.PyAssertionError: C++ assertion “IsOk()” failed at …..\src\common\image.cpp(1506) in wxIm
age::Replace(): invalid image
I’m calling UnInit() to release the aui manager as described in the doc.
When removing the creation the AuiManager (and the UnInit() ) there is no leakage.
I’m using wx ver:2.9.3.1, but I’m suspecting it happens in ver 2.8.1 as well.
I would appreciate any thought on this.
Thanks,
Oren
import wx
from wx.lib.agw import aui
class MyPanel(wx.Panel):
def init(self, parent):
wx.Panel.init(self, parent)
self._aui_mgr = aui.AuiManager()
def Destroy(self):
self._aui_mgr.UnInit()
wx.Panel.Destroy(self)
class MainWindow(wx.Frame):
def init(self):
wx.Frame.init(self, parent=None)
self.Show(True)
self.Bind(wx.EVT_TIMER, self._on_timer)
self._timer = wx.Timer(self)
self._timer.Start(100)
def _on_timer(self, event):
new_panel = MyPanel(self)
new_panel.Destroy()
def main():
app = wx.App()
mw = MainWindow()
app.MainLoop()
if name == ‘main’:
main()
On Tuesday, March 6, 2012 4:11:52 PM UTC+2, Oren wrote:
I’m having a memory leakage problem using agw.aui.AuiManager.
I’ve created a stripped down sample that shows the leak - listed below.
I’m creating a panel and destroying it repeatedly. Memory usage grows and after a short while the application fires he following assertion error:
wx._core.PyAssertionError: C++ assertion “IsOk()” failed at …..\src\common\image.cpp(1506) in wxIm
age::Replace(): invalid image
I’m calling UnInit() to release the aui manager as described in the doc.
When removing the creation the AuiManager (and the UnInit() ) there is no leakage.
I’m using wx ver:2.9.3.1, but I’m suspecting it happens in ver 2.8.1 as well.
I would appreciate any thought on this.
Thanks,
Oren
import wx
from wx.lib.agw import aui
class MyPanel(wx.Panel):
def init(self, parent):
wx.Panel.init(self, parent)
self._aui_mgr = aui.AuiManager()
def Destroy(self):
self._aui_mgr.UnInit()
wx.Panel.Destroy(self)
class MainWindow(wx.Frame):
def init(self):
wx.Frame.init(self, parent=None)
self.Show(True)
self.Bind(wx.EVT_TIMER, self._on_timer)
self._timer = wx.Timer(self)
self._timer.Start(100)
def _on_timer(self, event):
new_panel = MyPanel(self)
new_panel.Destroy()
def main():
app = wx.App()
mw = MainWindow()
app.MainLoop()
if name == ‘main’:
main()
On Tuesday, March 6, 2012 4:11:52 PM UTC+2, Oren wrote:
I’m having a memory leakage problem using agw.aui.AuiManager.
I’ve created a stripped down sample that shows the leak - listed below.
I’m creating a panel and destroying it repeatedly. Memory usage grows and after a short while the application fires he following assertion error:
wx._core.PyAssertionError: C++ assertion “IsOk()” failed at …..\src\common\image.cpp(1506) in wxIm
age::Replace(): invalid image
I’m calling UnInit() to release the aui manager as described in the doc.
When removing the creation the AuiManager (and the UnInit() ) there is no leakage.
I’m using wx ver:2.9.3.1, but I’m suspecting it happens in ver 2.8.1 as well.
I would appreciate any thought on this.
Thanks,
Oren
import wx
from wx.lib.agw import aui
class MyPanel(wx.Panel):
def init(self, parent):
wx.Panel.init(self, parent)
self._aui_mgr = aui.AuiManager()
def Destroy(self):
self._aui_mgr.UnInit()
wx.Panel.Destroy(self)
class MainWindow(wx.Frame):
def init(self):
wx.Frame.init(self, parent=None)
self.Show(True)
self.Bind(wx.EVT_TIMER, self._on_timer)
self._timer = wx.Timer(self)
self._timer.Start(100)
def _on_timer(self, event):
new_panel = MyPanel(self)
new_panel.Destroy()
def main():
app = wx.App()
mw = MainWindow()
app.MainLoop()
if name == ‘main’:
main()
On Tuesday, March 6, 2012 4:11:52 PM UTC+2, Oren wrote:
I’m having a memory leakage problem using agw.aui.AuiManager.
I’ve created a stripped down sample that shows the leak - listed below.
I’m creating a panel and destroying it repeatedly. Memory usage grows and after a short while the application fires he following assertion error:
wx._core.PyAssertionError: C++ assertion “IsOk()” failed at …..\src\common\image.cpp(1506) in wxIm
age::Replace(): invalid image
I’m calling UnInit() to release the aui manager as described in the doc.
When removing the creation the AuiManager (and the UnInit() ) there is no leakage.
I’m using wx ver:2.9.3.1, but I’m suspecting it happens in ver 2.8.1 as well.
I would appreciate any thought on this.
Thanks,
Oren
import wx
from wx.lib.agw import aui
class MyPanel(wx.Panel):
def init(self, parent):
wx.Panel.init(self, parent)
self._aui_mgr = aui.AuiManager()
def Destroy(self):
self._aui_mgr.UnInit()
wx.Panel.Destroy(self)
class MainWindow(wx.Frame):
def init(self):
wx.Frame.init(self, parent=None)
self.Show(True)
self.Bind(wx.EVT_TIMER, self._on_timer)
self._timer = wx.Timer(self)
self._timer.Start(100)
def _on_timer(self, event):
new_panel = MyPanel(self)
new_panel.Destroy()
def main():
app = wx.App()
mw = MainWindow()
app.MainLoop()
if name == ‘main’:
main()
On Tuesday, March 6, 2012 4:11:52 PM UTC+2, Oren wrote:
I’m having a memory leakage problem using agw.aui.AuiManager.
I’ve created a stripped down sample that shows the leak - listed below.
I’m creating a panel and destroying it repeatedly. Memory usage grows and after a short while the application fires he following assertion error:
wx._core.PyAssertionError: C++ assertion “IsOk()” failed at …..\src\common\image.cpp(1506) in wxIm
age::Replace(): invalid image
I’m calling UnInit() to release the aui manager as described in the doc.
When removing the creation the AuiManager (and the UnInit() ) there is no leakage.
I’m using wx ver:2.9.3.1, but I’m suspecting it happens in ver 2.8.1 as well.
I would appreciate any thought on this.
Thanks,
Oren
import wx
from wx.lib.agw import aui
class MyPanel(wx.Panel):
def init(self, parent):
wx.Panel.init(self, parent)
self._aui_mgr = aui.AuiManager()
def Destroy(self):
self._aui_mgr.UnInit()
wx.Panel.Destroy(self)
class MainWindow(wx.Frame):
def init(self):
wx.Frame.init(self, parent=None)
self.Show(True)
self.Bind(wx.EVT_TIMER, self._on_timer)
self._timer = wx.Timer(self)
self._timer.Start(100)
def _on_timer(self, event):
new_panel = MyPanel(self)
new_panel.Destroy()
def main():
app = wx.App()
mw = MainWindow()
app.MainLoop()
if name == ‘main’:
main()
On Tuesday, March 6, 2012 4:11:52 PM UTC+2, Oren wrote:
I’m having a memory leakage problem using agw.aui.AuiManager.
I’ve created a stripped down sample that shows the leak - listed below.
I’m creating a panel and destroying it repeatedly. Memory usage grows and after a short while the application fires he following assertion error:
wx._core.PyAssertionError: C++ assertion “IsOk()” failed at …..\src\common\image.cpp(1506) in wxIm
age::Replace(): invalid image
I’m calling UnInit() to release the aui manager as described in the doc.
When removing the creation the AuiManager (and the UnInit() ) there is no leakage.
I’m using wx ver:2.9.3.1, but I’m suspecting it happens in ver 2.8.1 as well.
I would appreciate any thought on this.
Thanks,
Oren
import wx
from wx.lib.agw import aui
class MyPanel(wx.Panel):
def init(self, parent):
wx.Panel.init(self, parent)
self._aui_mgr = aui.AuiManager()
def Destroy(self):
self._aui_mgr.UnInit()
wx.Panel.Destroy(self)
class MainWindow(wx.Frame):
def init(self):
wx.Frame.init(self, parent=None)
self.Show(True)
self.Bind(wx.EVT_TIMER, self._on_timer)
self._timer = wx.Timer(self)
self._timer.Start(100)
def _on_timer(self, event):
new_panel = MyPanel(self)
new_panel.Destroy()
def main():
app = wx.App()
mw = MainWindow()
app.MainLoop()
if name == ‘main’:
main()