From 229d499f7b791b0217b398d7bed6f0f7ca0d7d43 Mon Sep 17 00:00:00 2001 From: mfranz Date: Wed, 21 Jun 2006 21:17:21 +0000 Subject: [PATCH] oh, and by the way: this destructor didn't do anything useful :-) --- src/GUI/new_gui.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx index 53569c5b4..9c8297a5b 100644 --- a/src/GUI/new_gui.cxx +++ b/src/GUI/new_gui.cxx @@ -414,7 +414,9 @@ FGFontCache::FGFontCache() : FGFontCache::~FGFontCache() { - _fonts.clear(); + map::iterator it, end = _fonts.end(); + for (it = _fonts.begin(); it != end; ++it) + delete it->second; } struct FGFontCache::fnt * @@ -429,7 +431,7 @@ FGFontCache::getfnt(const char *name, float size, float slant) _path.append("Fonts"); } - for (int i=0; guifonts[i].name; i++) + for (int i = 0; guifonts[i].name; i++) _fonts[guifonts[i].name] = new fnt(guifonts[i].font); _initialized = true; -- 2.39.5