From 88d73d54e30f14513e3f9495bfe7e0772d98076a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 4 Jan 2003 08:12:19 +0000 Subject: [PATCH] fixes --- stepmania/src/Font.h | 1 + stepmania/src/FontManager.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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; }