From bd4e0834198313eeebb16d4c8bafd81f42e5fa16 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 5 May 2007 13:25:17 +0000 Subject: [PATCH 1/1] Apply [ 1710684 ] Fix wxAuiNotebook memory leak git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/aui/auibook.cpp | 5 +++++ src/aui/framemanager.cpp | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index 8dc1918a7f..64e0d728e5 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -2232,6 +2232,11 @@ public: m_tab_ctrl_height = 20; } + ~wxTabFrame() + { + wxDELETE(m_tabs); + } + void SetTabCtrlHeight(int h) { m_tab_ctrl_height = h; diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index ea05d8bbd7..ce4429b504 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -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; } -- 2.45.2