I got tired of some of the memory leak messages related to html and
filesystem classes, (even when I wasn't using them) so I added to the cleanup code already there. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -175,6 +175,9 @@ class WXDLLEXPORT wxFileSystem : public wxObject
|
||||
static void AddHandler(wxFileSystemHandler *handler);
|
||||
// Adds FS handler.
|
||||
// In fact, this class is only front-end to the FS hanlers :-)
|
||||
|
||||
static void CleanUpHandlers();
|
||||
// remove all items from the m_Handlers list
|
||||
};
|
||||
|
||||
|
||||
|
@@ -309,6 +309,12 @@ void wxFileSystem::AddHandler(wxFileSystemHandler *handler)
|
||||
}
|
||||
|
||||
|
||||
void wxFileSystem::CleanUpHandlers()
|
||||
{
|
||||
m_Handlers.DeleteContents(TRUE);
|
||||
m_Handlers.Clear();
|
||||
}
|
||||
|
||||
|
||||
///// Module:
|
||||
|
||||
@@ -325,6 +331,7 @@ class wxFileSystemModule : public wxModule
|
||||
virtual void OnExit()
|
||||
{
|
||||
wxFileSystemHandler::CleanUpStatics();
|
||||
wxFileSystem::CleanUpHandlers();
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -389,13 +389,16 @@ void wxHtmlWindow::CleanUpStatics()
|
||||
{
|
||||
if (m_DefaultFilter) delete m_DefaultFilter;
|
||||
m_DefaultFilter = NULL;
|
||||
wxNode* node = m_Filters.GetFirst();
|
||||
m_Filters.DeleteContents(TRUE);
|
||||
m_Filters.Clear();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlWindow::AddFilter(wxHtmlFilter *filter)
|
||||
{
|
||||
m_Filters.DeleteContents(TRUE);
|
||||
m_Filters.Append(filter);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user