model: delete Threads on destruction
authorBrian Norris <banorris@uci.edu>
Thu, 2 Aug 2012 17:25:31 +0000 (10:25 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 2 Aug 2012 18:03:11 +0000 (11:03 -0700)
When switching from STL map to hashtable, the Thread destruction was just
commented out instead of reimplemented. This is a good enough version, I think.

model.cc

index b456c246468cd7d5674e65bfe42ff2cd4a348462..98c6e645382bf2bdc32bc75e45e3a90b1de4a3cd 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -41,9 +41,8 @@ ModelChecker::ModelChecker() :
 /** @brief Destructor */
 ModelChecker::~ModelChecker()
 {
-       /*      std::map<int, Thread *>::iterator it;
-       for (it = thread_map->begin(); it != thread_map->end(); it++)
-       delete (*it).second;*/
+       for (int i = 0; i < get_num_threads(); i++)
+               delete thread_map->get(i);
        delete thread_map;
 
        delete obj_thrd_map;