1
0
Fork 0

Mathias Frhlich:

I have done a valgrind run in flightgear. Just start it up and close it at the
fist change I had about half an hour later.

source-leak.diff:
   Also two minor ones, but leaks ...
This commit is contained in:
ehofman 2005-10-14 16:25:14 +00:00
parent a7a46bdb90
commit dafa6ced1b
3 changed files with 12 additions and 3 deletions

View file

@ -181,6 +181,9 @@ NewGUI::clear ()
delete _menubar;
_menubar = 0;
_dialog_props.clear();
_itt_t it;
for (it = _colors.begin(); it != _colors.end(); ++it)
delete it->second;
_colors.clear();
}
@ -265,6 +268,9 @@ NewGUI::readDir (const char * path)
void
NewGUI::setStyle (void)
{
_itt_t it;
for (it = _colors.begin(); it != _colors.end(); ++it)
delete it->second;
_colors.clear();
// set up the traditional colors as default

View file

@ -155,11 +155,11 @@ public:
virtual FGDialog * getActiveDialog ();
virtual FGColor *getColor (const char * name) const {
_itt_t it = _colors.find(name);
_citt_t it = _colors.find(name);
return (it != _colors.end()) ? it->second : NULL;
}
virtual FGColor *getColor (const string &name) const {
_itt_t it = _colors.find(name.c_str());
_citt_t it = _colors.find(name.c_str());
return (it != _colors.end()) ? it->second : NULL;
}
@ -203,7 +203,8 @@ private:
fntTexFont _tex_font;
puFont _font;
map<const char*,FGColor*, ltstr> _colors;
typedef map<const char*,FGColor*, ltstr>::const_iterator _itt_t;
typedef map<const char*,FGColor*, ltstr>::iterator _itt_t;
typedef map<const char*,FGColor*, ltstr>::const_iterator _citt_t;
// Free all allocated memory.
void clear ();

View file

@ -978,6 +978,8 @@ FGTileEntry::load( const string_list &path_list, bool is_base )
if ( taxi_lights_transform->getNumKids() > 0 ) {
taxi_lights_transform->setTransform( sgdTrans );
}
delete light_pts;
}
void