]> git.saurik.com Git - wxWidgets.git/commitdiff
Apply [ 1710684 ] Fix wxAuiNotebook memory leak
authorRobert Roebling <robert@roebling.de>
Sat, 5 May 2007 13:25:17 +0000 (13:25 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 5 May 2007 13:25:17 +0000 (13:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/auibook.cpp
src/aui/framemanager.cpp

index 8dc1918a7f08bb4609affca66fed03b4399bc5b9..64e0d728e53b06f5ab1a97cb23271eab5cadcb2e 100644 (file)
@@ -2232,6 +2232,11 @@ public:
         m_tab_ctrl_height = 20;
     }
 
+       ~wxTabFrame()
+       {
+               wxDELETE(m_tabs);
+       }
+
     void SetTabCtrlHeight(int h)
     {
         m_tab_ctrl_height = h;
index ea05d8bbd7adec74f0ecc33fd7fdcc0ac8366f38..ce4429b504d65fe0f3fdaaae2104b199fbc965c3 100644 (file)
@@ -511,6 +511,14 @@ wxAuiManager::wxAuiManager(wxWindow* managed_wnd, unsigned int flags)
 
 wxAuiManager::~wxAuiManager()
 {
+    int i;
+       for (i = 0; i < m_panes.Count(); i++ )
+       {
+               wxAuiPaneInfo& pinfo = m_panes.Item(i);
+               if (pinfo.window && pinfo.window->GetParent() == 0)
+                       delete pinfo.window;
+       }
+    
     delete m_art;
 }