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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user