X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/26481315da88023dc827d8a441e27f41aa85d942..8dfef0c246fb5c741334ecc085aea56324bc0bf8:/src/common/zipstrm.cpp diff --git a/src/common/zipstrm.cpp b/src/common/zipstrm.cpp index 6b2722fc04..4aa752940c 100644 --- a/src/common/zipstrm.cpp +++ b/src/common/zipstrm.cpp @@ -470,7 +470,6 @@ class wxZipMemory { public: wxZipMemory() : m_data(NULL), m_size(0), m_capacity(0), m_ref(1) { } - ~wxZipMemory() { delete m_data; } wxZipMemory *AddRef() { m_ref++; return this; } void Release() { if (--m_ref == 0) delete this; } @@ -482,6 +481,7 @@ public: wxZipMemory *Unique(size_t size); private: + ~wxZipMemory() { delete m_data; } char *m_data; size_t m_size; @@ -548,7 +548,6 @@ class wxZipWeakLinks { public: wxZipWeakLinks() : m_ref(1) { } - ~wxZipWeakLinks() { wxASSERT(IsEmpty()); } void Release(const wxZipInputStream* WXUNUSED(x)) { if (--m_ref == 0) delete this; } @@ -562,6 +561,7 @@ public: bool IsEmpty() const { return m_entries.empty(); } private: + ~wxZipWeakLinks() { wxASSERT(IsEmpty()); } int m_ref; _wxOffsetZipEntryMap m_entries; @@ -622,7 +622,8 @@ wxZipEntry::~wxZipEntry() } wxZipEntry::wxZipEntry(const wxZipEntry& e) - : m_SystemMadeBy(e.m_SystemMadeBy), + : wxArchiveEntry(e), + m_SystemMadeBy(e.m_SystemMadeBy), m_VersionMadeBy(e.m_VersionMadeBy), m_VersionNeeded(e.m_VersionNeeded), m_Flags(e.m_Flags), @@ -640,7 +641,7 @@ wxZipEntry::wxZipEntry(const wxZipEntry& e) m_ExternalAttributes(e.m_ExternalAttributes), m_Extra(AddRef(e.m_Extra)), m_LocalExtra(AddRef(e.m_LocalExtra)), - m_zipnotifier(e.m_zipnotifier), + m_zipnotifier(NULL), m_backlink(NULL) { } @@ -666,7 +667,7 @@ wxZipEntry& wxZipEntry::operator=(const wxZipEntry& e) m_ExternalAttributes = e.m_ExternalAttributes; Copy(m_Extra, e.m_Extra); Copy(m_LocalExtra, e.m_LocalExtra); - m_zipnotifier = e.m_zipnotifier; + m_zipnotifier = NULL; if (m_backlink) { m_backlink->Release(m_Key); m_backlink = NULL; @@ -1146,7 +1147,6 @@ class wxZipStreamLink { public: wxZipStreamLink(wxZipOutputStream *stream) : m_ref(1), m_stream(stream) { } - ~wxZipStreamLink() { } wxZipStreamLink *AddRef() { m_ref++; return this; } wxZipOutputStream *GetOutputStream() const { return m_stream; } @@ -1157,6 +1157,7 @@ public: { m_stream = NULL; if (--m_ref == 0) delete this; } private: + ~wxZipStreamLink() { } int m_ref; wxZipOutputStream *m_stream;