From: mfranz Date: Wed, 21 Jun 2006 21:17:21 +0000 (+0000) Subject: oh, and by the way: this destructor didn't do anything useful :-) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=229d499f7b791b0217b398d7bed6f0f7ca0d7d43;p=flightgear.git oh, and by the way: this destructor didn't do anything useful :-) --- 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;