diff --git a/src/common/object.cpp b/src/common/object.cpp index b01cab1531..6f378e6810 100644 --- a/src/common/object.cpp +++ b/src/common/object.cpp @@ -254,6 +254,8 @@ void wxObject::StoreObject( wxObjectOutputStream& stream ) serial->SetObject(this); serial->StoreObject(stream); + + delete serial; } void wxObject::LoadObject( wxObjectInputStream& stream ) @@ -275,6 +277,8 @@ void wxObject::LoadObject( wxObjectInputStream& stream ) serial->SetObject(this); serial->LoadObject(stream); + + delete serial; } #endif diff --git a/src/common/stream.cpp b/src/common/stream.cpp index 44226e5721..34b9f1be7d 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -42,6 +42,7 @@ wxStreamBuffer::wxStreamBuffer(wxOutputStream& o_stream) wxStreamBuffer::~wxStreamBuffer() { + wxDELETEA(m_buffer_start); } void wxStreamBuffer::WriteBack(char c)