From f2ae0da1b5d52489f21d04e3c8c88c2498aea0e7 Mon Sep 17 00:00:00 2001 From: Steve Lamerton Date: Wed, 5 Oct 2011 21:21:51 +0000 Subject: [PATCH] Delete the filesystem used by wxWebViewArchiveHandler when we are done with it. Fixes a memory leak. Closes #13500 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/webviewarchivehandler.h | 2 +- src/common/webviewarchivehandler.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/wx/webviewarchivehandler.h b/include/wx/webviewarchivehandler.h index a0d02b6f27..75a5265941 100644 --- a/include/wx/webviewarchivehandler.h +++ b/include/wx/webviewarchivehandler.h @@ -26,7 +26,7 @@ class WXDLLIMPEXP_WEBVIEW wxWebViewArchiveHandler : public wxWebViewHandler { public: wxWebViewArchiveHandler(const wxString& scheme); - virtual ~wxWebViewArchiveHandler() {} + virtual ~wxWebViewArchiveHandler(); virtual wxFSFile* GetFile(const wxString &uri); private: wxFileSystem* m_fileSystem; diff --git a/src/common/webviewarchivehandler.cpp b/src/common/webviewarchivehandler.cpp index 10f15df7e0..438426b203 100644 --- a/src/common/webviewarchivehandler.cpp +++ b/src/common/webviewarchivehandler.cpp @@ -50,6 +50,11 @@ wxWebViewArchiveHandler::wxWebViewArchiveHandler(const wxString& scheme) : m_fileSystem = new wxFileSystem(); } +wxWebViewArchiveHandler::~wxWebViewArchiveHandler() +{ + wxDELETE(m_fileSystem); +} + wxFSFile* wxWebViewArchiveHandler::GetFile(const wxString &uri) { //If there is a fragment at the end of the path then we need to strip it