fixed memory leak in modules list (devik's patch)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2000-05-01 13:08:56 +00:00
parent 4401790cca
commit 9faba833a2
2 changed files with 9 additions and 0 deletions

View File

@@ -66,6 +66,7 @@ class WXDLLEXPORT wxHtmlWinParser : public wxHtmlParser
static void AddModule(wxHtmlTagsModule *module); static void AddModule(wxHtmlTagsModule *module);
// Adds tags module. see wxHtmlTagsModule for details. // Adds tags module. see wxHtmlTagsModule for details.
static void RemoveModule(wxHtmlTagsModule *module);
// parsing-related methods. These methods are called by tag handlers: // parsing-related methods. These methods are called by tag handlers:
wxHtmlContainerCell *GetContainer() const {return m_Container;} wxHtmlContainerCell *GetContainer() const {return m_Container;}

View File

@@ -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) void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face, const int *sizes)
{ {
int i, j, k, l, m; int i, j, k, l, m;
@@ -392,6 +399,7 @@ bool wxHtmlTagsModule::OnInit()
void wxHtmlTagsModule::OnExit() void wxHtmlTagsModule::OnExit()
{ {
wxHtmlWinParser::RemoveModule(this);
} }
#endif #endif