diff --git a/src/backend/concrete_history.cc b/src/backend/concrete_history.cc index 8d2e85b..db21e73 100644 --- a/src/backend/concrete_history.cc +++ b/src/backend/concrete_history.cc @@ -293,11 +293,10 @@ ConcreteHistory::remove(SubRequest& subrequest) void ConcreteHistory::clear() { - for_each(_snapshots.begin(), _snapshots.end(), - deletor()); - _snapshots.clear(); - _snapshots.push_back(new ConcreteEnvironment()); + reset(false); assert(_snapshots.size() == 1); + delete _snapshots.front(); + _snapshots.front() = new ConcreteEnvironment(); notify_change(); } @@ -400,7 +399,6 @@ ConcreteHistory::add_thread(const Glib::ustring& name, { reset(false); - // Holy cow! *THIS* is ugly!!!! DynamicProcess& parent_process = dynamic_cast(parent); StaticProcess& parent_core = parent_process.get_core(); StaticThread* core = new StaticThread(name, parent_core, cpu_time, arrival_time, base_priority);