summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/generic/glyphs/glyphcache.cxx26
1 files changed, 8 insertions, 18 deletions
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index bf2159ede80d..923ca476895f 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -68,32 +68,22 @@ GlyphCache::GlyphCache( GlyphCachePeer& rPeer )
GlyphCache::~GlyphCache()
{
InvalidateAllGlyphs();
- for( FontList::iterator it = maFontList.begin(), end = maFontList.end(); it != end; ++it )
- {
- ServerFont* pServerFont = it->second;
- mrPeer.RemovingFont(*pServerFont);
- delete pServerFont;
- }
- if( mpFtManager )
- delete mpFtManager;
+ delete mpFtManager;
}
// -----------------------------------------------------------------------
void GlyphCache::InvalidateAllGlyphs()
{
- // an application about to exit can omit garbage collecting the heap
- // since it makes things slower and introduces risks if the heap was not perfect
- // for debugging, for memory grinding or leak checking the env allows to force GC
- const char* pEnv = getenv( "SAL_FORCE_GC_ON_EXIT" );
- if( pEnv && (*pEnv != '0') )
+ for( FontList::iterator it = maFontList.begin(), end = maFontList.end(); it != end; ++it )
{
- // uncache of all glyph shapes and metrics
- for( FontList::iterator it = maFontList.begin(); it != maFontList.end(); ++it )
- delete const_cast<ServerFont*>( it->second );
- maFontList.clear();
- mpCurrentGCFont = NULL;
+ ServerFont* pServerFont = it->second;
+ mrPeer.RemovingFont(*pServerFont);
+ delete pServerFont;
}
+
+ maFontList.clear();
+ mpCurrentGCFont = NULL;
}
// -----------------------------------------------------------------------