fixed a huge memory leak in wxStreamBuffer
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 13 Jan 2002 00:05:37 +0000 (00:05 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 13 Jan 2002 00:05:37 +0000 (00:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/stream.cpp

index 3cf1db7f2749d40f527e22325b374170bcef9949..c6ffc3895be16d426d10abaa53cacef505c54a85 100644 (file)
@@ -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()