Fix deletes that should be delete[]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -485,7 +485,7 @@ public:
|
|||||||
wxZipMemory *Unique(size_t size);
|
wxZipMemory *Unique(size_t size);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~wxZipMemory() { delete m_data; }
|
~wxZipMemory() { delete [] m_data; }
|
||||||
|
|
||||||
char *m_data;
|
char *m_data;
|
||||||
size_t m_size;
|
size_t m_size;
|
||||||
@@ -505,7 +505,7 @@ wxZipMemory *wxZipMemory::Unique(size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (zm->m_capacity < size) {
|
if (zm->m_capacity < size) {
|
||||||
delete zm->m_data;
|
delete [] zm->m_data;
|
||||||
zm->m_data = new char[size];
|
zm->m_data = new char[size];
|
||||||
zm->m_capacity = size;
|
zm->m_capacity = size;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user