diff --git a/include/wx/html/winpars.h b/include/wx/html/winpars.h index 2c90277586..1d96d69de5 100644 --- a/include/wx/html/winpars.h +++ b/include/wx/html/winpars.h @@ -66,6 +66,7 @@ class WXDLLEXPORT wxHtmlWinParser : public wxHtmlParser static void AddModule(wxHtmlTagsModule *module); // Adds tags module. see wxHtmlTagsModule for details. + static void RemoveModule(wxHtmlTagsModule *module); // parsing-related methods. These methods are called by tag handlers: wxHtmlContainerCell *GetContainer() const {return m_Container;} diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp index 24748b018a..ca7afc5fd5 100644 --- a/src/html/winpars.cpp +++ b/src/html/winpars.cpp @@ -103,6 +103,13 @@ void wxHtmlWinParser::AddModule(wxHtmlTagsModule *module) +void wxHtmlWinParser::RemoveModule(wxHtmlTagsModule *module) +{ + m_Modules.DeleteObject(module); +} + + + void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) { int i, j, k, l, m; @@ -392,6 +399,7 @@ bool wxHtmlTagsModule::OnInit() void wxHtmlTagsModule::OnExit() { + wxHtmlWinParser::RemoveModule(this); } #endif