From: Brian Norris Date: Thu, 2 Aug 2012 17:25:31 +0000 (-0700) Subject: model: delete Threads on destruction X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=038be645c074ea23a606bd22a6b7c62469335f63;p=cdsspec-compiler.git model: delete Threads on destruction 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. --- diff --git a/model.cc b/model.cc index b456c24..98c6e64 100644 --- a/model.cc +++ b/model.cc @@ -41,9 +41,8 @@ ModelChecker::ModelChecker() : /** @brief Destructor */ ModelChecker::~ModelChecker() { - /* std::map::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;