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
+3 -3
View File
@@ -68,7 +68,7 @@ static SubscriptionManager<IThemeMetric> g_Subscribers;
class LocalizedStringImplThemeMetric : public ILocalizedStringImpl, public ThemeMetric<RString>
{
public:
static ILocalizedStringImpl *Create() { return new LocalizedStringImplThemeMetric; }
static ILocalizedStringImpl *Create() { return smnew LocalizedStringImplThemeMetric; }
void Load( const RString& sGroup, const RString& sName )
{
@@ -275,7 +275,7 @@ bool ThemeManager::DoesLanguageExist( const RString &sLanguage )
void ThemeManager::LoadThemeMetrics( const RString &sThemeName_, const RString &sLanguage_ )
{
if( g_pLoadedThemeData == NULL )
g_pLoadedThemeData = new LoadedThemeData;
g_pLoadedThemeData = smnew LoadedThemeData;
// Don't delete and recreate LoadedThemeData. There are references iniMetrics and iniStrings
// on the stack, so Clear them instead.
@@ -1052,7 +1052,7 @@ void ThemeManager::GetMetric( const RString &sMetricsGroup, const RString &sValu
#if !defined(SMPACKAGE)
apActorCommands ThemeManager::GetMetricA( const RString &sMetricsGroup, const RString &sValueName )
{
LuaReference *pRef = new LuaReference;
LuaReference *pRef = smnew LuaReference;
GetMetric( sMetricsGroup, sValueName, *pRef );
return apActorCommands( pRef );
}