From f85c5d7375d75d3969b27b95be84490bc838b6fc Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Wed, 21 Jul 2004 06:18:01 +0000 Subject: [PATCH] Fix memory leak. Now I'm down to 11 leaks for 384 total leaked bytes. It looks like some of those are coming from SDL. Still, I can live with 384 bytes. --- stepmania/src/XmlFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/XmlFile.cpp b/stepmania/src/XmlFile.cpp index 9dab12106b..ab20224974 100644 --- a/stepmania/src/XmlFile.cpp +++ b/stepmania/src/XmlFile.cpp @@ -1196,7 +1196,7 @@ CString XENTITYS::Ref2Entity( const char* estr ) { int len = strlen(estr); // char* esbuf = es.GetBufferSetLength( len+1 ); - char* szTemp = new char[len+1]; + char szTemp[len+1]; if( szTemp ) Ref2Entity( estr, szTemp, len ); es = szTemp; @@ -1214,7 +1214,7 @@ CString XENTITYS::Entity2Ref( const char* str ) return CString(str); int len = strlen(str) + nEntityCount*10 ; //char* sbuf = s.GetBufferSetLength( len+1 ); - char* szTemp = new char[len+1]; + char szTemp[len+1]; if( szTemp ) Entity2Ref( str, szTemp, len ); s = szTemp;