From 6f34921d9369a31de14e4b07e4824e2d701710f0 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 23 Aug 1998 14:06:39 +0000 Subject: [PATCH] * Fixed two memory leaks. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/object.cpp | 4 ++++ src/common/stream.cpp | 1 + 2 files changed, 5 insertions(+) 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) -- 2.45.2