From bdbaa8356ca1cfa97837e6f33c0057181f49fbad Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Mon, 26 Jan 2004 12:46:39 +0000 Subject: [PATCH] * src/tgbaalgos/magic.cc (magic_search::~magic_search): Release all iterators on the stack. (magic_search::check): Release iterators that are popped off the stack. --- ChangeLog | 5 +++++ src/tgbaalgos/magic.cc | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d5659bb08..8e8c89e10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-01-26 Alexandre Duret-Lutz + * src/tgbaalgos/magic.cc (magic_search::~magic_search): Release + all iterators on the stack. + (magic_search::check): Release iterators that are popped off the + stack. + * src/tgbatest/explpro2.test: Fix reordering regex. * src/tgbatest/defs.in (run): Use libtool --mode=execute. diff --git a/src/tgbaalgos/magic.cc b/src/tgbaalgos/magic.cc index 1fc2921c9..1ae7d4942 100644 --- a/src/tgbaalgos/magic.cc +++ b/src/tgbaalgos/magic.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6), +// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6), // département Systèmes Répartis Coopératifs (SRC), Université Pierre // et Marie Curie. // @@ -43,6 +43,12 @@ namespace spot } if (x) delete x; + // Release all iterators on the stack. + while (! stack.empty()) + { + delete stack.front().second; + stack.pop_front(); + } } void @@ -124,6 +130,7 @@ namespace spot } const state* s = p.first.s; + delete i; stack.pop_front(); if (! magic && a->state_is_accepting(s))