Fixed a memory leak that would occur after using any help button

Originally committed to SVN as r3050.
This commit is contained in:
harukalover 2009-06-12 00:04:35 +00:00
parent 4eeb89710d
commit 769f61eaf3
3 changed files with 6 additions and 0 deletions

View file

@ -585,6 +585,7 @@ void FrameMain::DeInitContents() {
delete AssFile::top; delete AssFile::top;
delete EditBox; delete EditBox;
delete videoBox; delete videoBox;
HelpButton::ClearPages();
} }

View file

@ -125,3 +125,7 @@ void HelpButton::InitStatic() {
page[_T("Visual Typesetting")] = _T("Visual_Typesetting"); page[_T("Visual Typesetting")] = _T("Visual_Typesetting");
} }
} }
void HelpButton::ClearPages() {
if (pages) delete pages;
}

View file

@ -57,4 +57,5 @@ public:
HelpButton(wxWindow *parent,wxString page=_T(""),wxPoint position=wxDefaultPosition,wxSize size=wxDefaultSize); HelpButton(wxWindow *parent,wxString page=_T(""),wxPoint position=wxDefaultPosition,wxSize size=wxDefaultSize);
static void OpenPage(const wxString page); static void OpenPage(const wxString page);
static void ClearPages();
}; };