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:
parent
a7a46bdb90
commit
dafa6ced1b
3 changed files with 12 additions and 3 deletions
|
@ -181,6 +181,9 @@ NewGUI::clear ()
|
||||||
delete _menubar;
|
delete _menubar;
|
||||||
_menubar = 0;
|
_menubar = 0;
|
||||||
_dialog_props.clear();
|
_dialog_props.clear();
|
||||||
|
_itt_t it;
|
||||||
|
for (it = _colors.begin(); it != _colors.end(); ++it)
|
||||||
|
delete it->second;
|
||||||
_colors.clear();
|
_colors.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,6 +268,9 @@ NewGUI::readDir (const char * path)
|
||||||
void
|
void
|
||||||
NewGUI::setStyle (void)
|
NewGUI::setStyle (void)
|
||||||
{
|
{
|
||||||
|
_itt_t it;
|
||||||
|
for (it = _colors.begin(); it != _colors.end(); ++it)
|
||||||
|
delete it->second;
|
||||||
_colors.clear();
|
_colors.clear();
|
||||||
|
|
||||||
// set up the traditional colors as default
|
// set up the traditional colors as default
|
||||||
|
|
|
@ -155,11 +155,11 @@ public:
|
||||||
virtual FGDialog * getActiveDialog ();
|
virtual FGDialog * getActiveDialog ();
|
||||||
|
|
||||||
virtual FGColor *getColor (const char * name) const {
|
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;
|
return (it != _colors.end()) ? it->second : NULL;
|
||||||
}
|
}
|
||||||
virtual FGColor *getColor (const string &name) const {
|
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;
|
return (it != _colors.end()) ? it->second : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,7 +203,8 @@ private:
|
||||||
fntTexFont _tex_font;
|
fntTexFont _tex_font;
|
||||||
puFont _font;
|
puFont _font;
|
||||||
map<const char*,FGColor*, ltstr> _colors;
|
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.
|
// Free all allocated memory.
|
||||||
void clear ();
|
void clear ();
|
||||||
|
|
|
@ -978,6 +978,8 @@ FGTileEntry::load( const string_list &path_list, bool is_base )
|
||||||
if ( taxi_lights_transform->getNumKids() > 0 ) {
|
if ( taxi_lights_transform->getNumKids() > 0 ) {
|
||||||
taxi_lights_transform->setTransform( sgdTrans );
|
taxi_lights_transform->setTransform( sgdTrans );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete light_pts;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Reference in a new issue