]> git.mxchange.org Git - flightgear.git/commitdiff
oh, and by the way: this destructor didn't do anything useful :-)
authormfranz <mfranz>
Wed, 21 Jun 2006 21:17:21 +0000 (21:17 +0000)
committermfranz <mfranz>
Wed, 21 Jun 2006 21:17:21 +0000 (21:17 +0000)
src/GUI/new_gui.cxx

index 53569c5b48709d618d9e10653462d999dcb24aa9..9c8297a5b307b062a6262f89fb1d7ac72e768bc6 100644 (file)
@@ -414,7 +414,9 @@ FGFontCache::FGFontCache() :
 
 FGFontCache::~FGFontCache()
 {
-   _fonts.clear();
+   map<const string, fnt *>::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;