model: free threads, thread_map at destruction
authorBrian Norris <banorris@uci.edu>
Sat, 5 May 2012 06:33:42 +0000 (23:33 -0700)
committerBrian Norris <banorris@uci.edu>
Tue, 8 May 2012 17:38:51 +0000 (10:38 -0700)
model.cc

index 76789684df9e641fd4417ff5eccf0116b33f2133..20f8f9e0d255cb138a8288065fde234ab95bcf3e 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -50,6 +50,11 @@ ModelChecker::ModelChecker()
 
 ModelChecker::~ModelChecker()
 {
+       std::map<int, class Thread *>::iterator it;
+       for (it = thread_map.begin(); it != thread_map.end(); it++)
+               delete (*it).second;
+       thread_map.clear();
+
        delete action_trace;
        delete this->scheduler;
        delete rootNode;