Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Free xbt_automaton on Api::s_close.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 23 Feb 2022 22:07:55 +0000 (23:07 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 24 Feb 2022 10:54:43 +0000 (11:54 +0100)
src/mc/api.cpp

index 8ac88e5..fcb42d8 100644 (file)
@@ -176,6 +176,10 @@ simgrid::mc::Snapshot* Api::take_snapshot(long num_state) const
 void Api::s_close() const
 {
   session_singleton->close();
+  if (simgrid::mc::property_automaton != nullptr) {
+    xbt_automaton_free(simgrid::mc::property_automaton);
+    simgrid::mc::property_automaton = nullptr;
+  }
 }
 
 void Api::automaton_load(const char* file) const