diff --git a/stepmania/src/Font.h b/stepmania/src/Font.h index d8a9c02910..d78ca62f6a 100644 --- a/stepmania/src/Font.h +++ b/stepmania/src/Font.h @@ -63,6 +63,7 @@ public: map m_iCharToGlyph; Font(); + ~Font(); RageTexture *GetGlyphTexture( int c ); const glyph &GetGlyph( int c ) const; diff --git a/stepmania/src/FontManager.cpp b/stepmania/src/FontManager.cpp index 2b81a964d6..857826a95a 100644 --- a/stepmania/src/FontManager.cpp +++ b/stepmania/src/FontManager.cpp @@ -33,7 +33,7 @@ FontManager::~FontManager() { Font* pFont = i->second; LOG->Trace( "FONT LEAK: '%s', RefCount = %d.", i->first.GetString(), pFont->m_iRefCount ); - SAFE_DELETE( pFont ); + delete pFont; } } @@ -52,8 +52,8 @@ Font* FontManager::LoadFont( CString sFontOrTextureFilePath, CString sChars ) map::iterator p = m_mapPathToFont.find(sFontOrTextureFilePath); if(p != m_mapPathToFont.end()) { -// LOG->Trace( ssprintf("FontManager: The Font '%s' now has %d references.", sFontFilePath.GetString(), pFont->m_iRefCount) ); Font *pFont=p->second; +// LOG->Trace( ssprintf("FontManager: The Font '%s' now has %d references.", sFontOrTextureFilePath.GetString(), pFont->m_iRefCount) ); pFont->m_iRefCount++; return pFont; }