Fixed a lot of memory leaks caused by static globals never getting

deleted and some other objects not getting deleted properly due to missing
destructors.
This commit is contained in:
Shenjoku
2013-04-18 21:17:57 -07:00
parent 5f7001ef0a
commit 01456ed0b9
29 changed files with 239 additions and 171 deletions
+3 -2
View File
@@ -741,8 +741,6 @@ void Font::Load( const RString &sIniPath, RString sChars )
{
const RString &sTexturePath = asTexturePaths[i];
FontPage *pPage = smnew FontPage;
// Grab the page name, eg "foo" from "Normal [foo].png".
RString sPagename = GetPageNameFromFileName( sTexturePath );
@@ -750,6 +748,9 @@ void Font::Load( const RString &sIniPath, RString sChars )
if( sTexturePath.find("-stroke") != string::npos )
continue;
// Create this down here so it doesn't leak if the continue gets triggered.
FontPage *pPage = smnew FontPage;
// Load settings for this page from the INI.
FontPageSettings cfg;
LoadFontPageSettings( cfg, ini, sTexturePath, "common", sChars );