]> git.tdb.fi Git - gldbg.git/blobdiff - source/commandinterpreter.cpp
Fix several problems reported by valgrind
[gldbg.git] / source / commandinterpreter.cpp
index 301535048bd6e8bcfe6084344b7aef248860ec65..b8a10a99d03cb0f30a4048c4754f370d42f09f8b 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of gldbg
-Copyright © 2009-2011  Mikko Rasa, Mikkosoft Productions
-Distributed under the GPL
-*/
-
 #include <stdexcept>
 #include <cstdlib>
 #include <signal.h>
@@ -60,6 +53,12 @@ CommandInterpreter::CommandInterpreter(GlDbg &d):
 
 }
 
+CommandInterpreter::~CommandInterpreter()
+{
+       for(CommandMap::iterator i=commands.begin(); i!=commands.end(); ++i)
+               delete i->second;
+}
+
 void CommandInterpreter::execute(const string &cmd)
 {
        unsigned space = cmd.find(' ');