Added a new branch that implements support for outputting all memory leaks to
the debug output for the Debug and FastDebug project configurations. This requires replacing all instances of new with a macro, smnew, that defines a special form of new which outputs file and line number information along with the memory leak details. This makes finding memory leaks much easier since you can just double-click the leak in the output window and it will take you to the line that caused it.
This commit is contained in:
+2
-2
@@ -27,7 +27,7 @@ RageFile::RageFile( const RageFile &cpy ):
|
||||
|
||||
RageFile *RageFile::Copy() const
|
||||
{
|
||||
return new RageFile( *this );
|
||||
return smnew RageFile( *this );
|
||||
}
|
||||
|
||||
RString RageFile::GetPath() const
|
||||
@@ -430,7 +430,7 @@ namespace RageFileUtil
|
||||
{
|
||||
int CreateRageFile( lua_State *L )
|
||||
{
|
||||
RageFile *pFile = new RageFile;
|
||||
RageFile *pFile = smnew RageFile;
|
||||
pFile->PushSelf( L );
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user