Fixed memory leak in generic wxFileDialog

Backported from head


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-04-06 15:36:12 +00:00
parent 3fd1786b81
commit bf9728b3d7
2 changed files with 8 additions and 0 deletions

View File

@@ -199,6 +199,7 @@ wxGTK:
- fixed bug in generic file selector causing incomplete file extensions to - fixed bug in generic file selector causing incomplete file extensions to
be appended to filenames with no extension be appended to filenames with no extension
- added SetSelection implementation for GTK+ 2 - added SetSelection implementation for GTK+ 2
- fixed a memory leak in generic wxFileDialog
wxMSW: wxMSW:

View File

@@ -1245,6 +1245,13 @@ wxFileDialog::~wxFileDialog()
wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ShowHidden"), wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ShowHidden"),
ms_lastShowHidden); ms_lastShowHidden);
} }
const size_t count = m_choice->GetCount();
size_t i;
for ( i = 0; i < count; i++ )
{
delete (wxString *)m_choice->GetClientData(i);
}
} }
int wxFileDialog::ShowModal() int wxFileDialog::ShowModal()