fix low hanging fruit when profiling...
[model-checker.git] / action.cc
index 383be230aaea3f4b505266688fde98ce7a6a8640..f80de7b322aa4dd288a2c6f8959240028ea9e3a8 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -23,10 +23,19 @@ ModelAction::ModelAction(action_type_t type, memory_order order, void *loc, uint
        this->tid = t->get_id();
 }
 
+/** @brief ModelAction destructor */
 ModelAction::~ModelAction()
 {
-       if (cv)
-               delete cv;
+       /**
+        * We can't free the clock vector:
+        * Clock vectors are snapshotting state. When we delete model actions,
+        * they are at the end of the node list and have invalid old clock
+        * vectors which have already been rolled back to an unallocated state.
+        */
+
+       /*
+        if (cv)
+               delete cv; */
 }
 
 void ModelAction::copy_from_new(ModelAction *newaction)