fix m_sizerPage memory leak for the wizards not using sizers (replaces patch 1708331, fixes bug 1647290) [backport from HEAD]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -105,6 +105,7 @@ All (Unix):
|
||||
All (GUI):
|
||||
|
||||
- Allow status bar children in XRC (Edmunt Pienkowski)
|
||||
- Fix memory leak in wxWizard when not using sizers for the page layout
|
||||
|
||||
wxMSW:
|
||||
|
||||
|
@@ -45,6 +45,10 @@ public:
|
||||
long style = wxDEFAULT_DIALOG_STYLE);
|
||||
void Init();
|
||||
|
||||
#if wxABI_VERSION >= 20804
|
||||
virtual ~wxWizard();
|
||||
#endif
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual bool RunWizard(wxWizardPage *firstPage);
|
||||
virtual wxWizardPage *GetCurrentPage() const;
|
||||
|
@@ -326,6 +326,15 @@ bool wxWizard::Create(wxWindow *parent,
|
||||
return result;
|
||||
}
|
||||
|
||||
wxWizard::~wxWizard()
|
||||
{
|
||||
// normally we don't have to delete this sizer as it's deleted by the
|
||||
// associated window but if we never used it or didn't set it as the window
|
||||
// sizer yet, do delete it manually
|
||||
if ( !m_usingSizer || !m_started )
|
||||
delete m_sizerPage;
|
||||
}
|
||||
|
||||
void wxWizard::AddBitmapRow(wxBoxSizer *mainColumn)
|
||||
{
|
||||
m_sizerBmpAndPage = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
Reference in New Issue
Block a user