From f60b1d829dd8a6d5e47a2adcd3690acb3bd10150 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 28 Jul 2005 21:00:46 +0000 Subject: [PATCH 1/1] added wxZipFSHandler::Cleanup() (modified patch 1213615) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + include/wx/fs_zip.h | 1 + src/common/fs_zip.cpp | 12 ++++++++---- version-script.in | 13 +++++++------ 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index e76ac4f833..b7480f9fc4 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -9,6 +9,7 @@ All: - Fixed wxScopeGuard to work with VC++, documented it. - Fixed proxy handling in wxURL. +- Added wxZipFSHandler::Cleanup() (Stas Sergeev) All (GUI): diff --git a/include/wx/fs_zip.h b/include/wx/fs_zip.h index 3293151b12..58ff653e8a 100644 --- a/include/wx/fs_zip.h +++ b/include/wx/fs_zip.h @@ -37,6 +37,7 @@ class WXDLLIMPEXP_BASE wxZipFSHandler : public wxFileSystemHandler virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location); virtual wxString FindFirst(const wxString& spec, int flags = 0); virtual wxString FindNext(); + void Cleanup(); ~wxZipFSHandler(); private: diff --git a/src/common/fs_zip.cpp b/src/common/fs_zip.cpp index d2b6100cc2..225159473b 100644 --- a/src/common/fs_zip.cpp +++ b/src/common/fs_zip.cpp @@ -71,13 +71,17 @@ wxZipFSHandler::wxZipFSHandler() : wxFileSystemHandler() wxZipFSHandler::~wxZipFSHandler() { - if (m_Archive) - delete m_Archive; - if (m_DirsFound) - delete m_DirsFound; + Cleanup(); } +void wxZipFSHandler::Cleanup() +{ + wxDELETE(m_Archive); + wxDELETE(m_DirsFound); +} + + bool wxZipFSHandler::CanOpen(const wxString& location) { diff --git a/version-script.in b/version-script.in index 42526223b0..cad768c7cc 100644 --- a/version-script.in +++ b/version-script.in @@ -6,20 +6,21 @@ # new development branch. -# public symbols added in release 2.6.2: +# public symbols added in release 2.6.2 (please keep in alphabetical order): @WX_VERSION_TAG@.2 { global: + *wxDialog*GetEscapeId*; *wxLogBuffer*; + *wxGenericListCtrl*SetItemFont*wxFont*; + *wxGenericListCtrl*GetItemFont*; *wxMessageOutputBest*; - *wxDialog*GetEscapeId*; + *wxShadowObject*; *wxWizard*FinishLayout*; *wxXmlResource*ConvertFileNameToURL*wxString*; - *wxXmlResource*Unload*wxString*; *wxXmlResource*IsArchive*wxString*; - *wxShadowObject*; - *wxGenericListCtrl*SetItemFont*wxFont*; - *wxGenericListCtrl*GetItemFont*; + *wxXmlResource*Unload*wxString*; + *wxZipFSHandler*Cleanup*; }; -- 2.45.2