From: Vadim Zeitlin Date: Sun, 13 Jan 2002 00:05:37 +0000 (+0000) Subject: fixed a huge memory leak in wxStreamBuffer X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d4b45f48c6f6da2f3d72298b0beb887c34f02065 fixed a huge memory leak in wxStreamBuffer git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/stream.cpp b/src/common/stream.cpp index 3cf1db7f27..c6ffc3895b 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -68,8 +68,8 @@ void wxStreamBuffer::InitBuffer() m_buffer_pos = NULL; m_buffer_size = 0; - // there is nothing to destroy anyhow - m_destroybuf = FALSE; + // if we are going to allocate the buffer, we should free it later as well + m_destroybuf = TRUE; } void wxStreamBuffer::Init()