diff --git a/ChangeLog b/ChangeLog index 4da60bb77..43308c125 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2003-10-24 Alexandre Duret-Lutz + * src/tgbaalgos/emptinesscheck.cc (emptiness_check::print_result): + Fix memory leak. + * src/tgbaalgos/emptinesscheck.cc (emptiness_check::check): Simplify, reorganize, and comment. * src/tgbaalgos/emptinesscheck.hh (emptiness_check::root_component): diff --git a/src/tgbaalgos/emptinesscheck.cc b/src/tgbaalgos/emptinesscheck.cc index 25ceb83b9..8c1a5aef4 100644 --- a/src/tgbaalgos/emptinesscheck.cc +++ b/src/tgbaalgos/emptinesscheck.cc @@ -219,29 +219,31 @@ namespace spot os << " "; if (restrict) { - os << restrict->format_state(aut_->project_state(*i_se, restrict)) - << std::endl; + const state* s = aut_->project_state(*i_se, restrict); + assert(s); + os << restrict->format_state(s) << std::endl; + delete s; } else { - os << aut_->format_state((*i_se)) << std::endl; + os << aut_->format_state(*i_se) << std::endl; } } os << "Cycle:" <second) << std::endl; os << " "; if (restrict) { - os << " | " << bdd_format_set(d, it->second) <format_state(aut_->project_state(it->first, - restrict)) - << std::endl; + const state* s = aut_->project_state(it->first, restrict); + assert(s); + os << restrict->format_state(s) << std::endl; + delete s; } else { - os << " | " << bdd_format_set(d, it->second) <format_state(it->first) << std::endl; } }