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:
Shenjoku
2013-04-17 20:42:29 -07:00
parent 05cf6d8cd8
commit 5f7001ef0a
199 changed files with 613 additions and 600 deletions
+4 -4
View File
@@ -59,7 +59,7 @@ public:
IDebugLine()
{
if( g_pvpSubscribers == NULL )
g_pvpSubscribers = new vector<IDebugLine*>;
g_pvpSubscribers = smnew vector<IDebugLine*>;
g_pvpSubscribers->push_back( this );
}
virtual ~IDebugLine() { }
@@ -260,7 +260,7 @@ void ScreenDebugOverlay::Init()
RString sButton = INPUTMAN->GetDeviceSpecificInputString( di );
BitmapText *p = new BitmapText;
BitmapText *p = smnew BitmapText;
p->SetName( "PageText" );
p->LoadFromFont( THEME->GetPathF("ScreenDebugOverlay", "page") );
LOAD_ALL_COMMANDS_AND_ON_COMMAND( p );
@@ -274,7 +274,7 @@ void ScreenDebugOverlay::Init()
FOREACH_CONST( IDebugLine*, *g_pvpSubscribers, p )
{
{
BitmapText *bt = new BitmapText;
BitmapText *bt = smnew BitmapText;
bt->SetName( "ButtonText" );
bt->LoadFromFont( THEME->GetPathF("ScreenDebugOverlay", "line") );
bt->SetHorizAlign( align_right );
@@ -284,7 +284,7 @@ void ScreenDebugOverlay::Init()
this->AddChild( bt );
}
{
BitmapText *bt = new BitmapText;
BitmapText *bt = smnew BitmapText;
bt->SetName( "FunctionText" );
bt->LoadFromFont( THEME->GetPathF("ScreenDebugOverlay", "line") );
bt->SetHorizAlign( align_left );