From 69914bcbbf719e94fabc74ab1c896ac37de12c16 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 30 Oct 2004 07:18:28 +0000 Subject: [PATCH] fix memory usage regression --- stepmania/src/Steps.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stepmania/src/Steps.cpp b/stepmania/src/Steps.cpp index 4849f8e91a..8f255a4109 100644 --- a/stepmania/src/Steps.cpp +++ b/stepmania/src/Steps.cpp @@ -222,6 +222,10 @@ void Steps::Compress() const { /* We have a file on disk; clear all data in memory. */ SAFE_DELETE( notes ); + + /* Be careful; 'x = ""', notes_comp.clear() and notes_comp.reserve(0) + * don't always free the alocated memory. */ + notes_comp = CString(""); } if( notes_comp.empty() )