From 97152f7856a81388163e883e340fa260f2719698 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 16 Dec 2004 10:24:37 +0000 Subject: [PATCH] fix memory leak when using styes (closes 1086273) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/statbar.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/statbar.cpp b/src/common/statbar.cpp index 641a772927..0544a98b67 100644 --- a/src/common/statbar.cpp +++ b/src/common/statbar.cpp @@ -61,7 +61,7 @@ wxStatusBarBase::~wxStatusBarBase() { FreeWidths(); FreeStacks(); - InitStyles(); + FreeStyles(); // notify the frame that it doesn't have a status bar any longer to avoid // dangling pointers @@ -285,12 +285,12 @@ void wxStatusBarBase::InitStacks() void wxStatusBarBase::FreeStacks() { - if(!m_statusTextStacks) return; - size_t i; + if ( !m_statusTextStacks ) + return; - for(i = 0; i < (size_t)m_nFields; ++i) + for ( size_t i = 0; i < (size_t)m_nFields; ++i ) { - if(m_statusTextStacks[i]) + if ( m_statusTextStacks[i] ) { wxListString& t = *m_statusTextStacks[i]; WX_CLEAR_LIST(wxListString, t); -- 2.45.2