for (auto const& kv : mailboxes_)
delete kv.second;
- /* Free the remaining data structures */
+ /* Kill all actors (but maestro) */
+ maestro_->kill_all();
+ run_all_actors();
+ empty_trash();
+
+ delete maestro_;
+ delete context_factory_;
+
+ /* Free the remaining data structures */
#if SIMGRID_HAVE_MC
xbt_dynar_free(&actors_vector_);
#endif
xbt_die("Bailing out to avoid that stop-before-start madness. Please fix your code.");
}
- /* Kill all actors (but maestro) */
- instance_->maestro_->kill_all();
- instance_->run_all_actors();
- instance_->empty_trash();
-
- /* Let's free maestro now */
- delete instance_->maestro_;
- instance_->maestro_ = nullptr;
-
- /* Finish context module and SURF */
- instance_->destroy_context_factory();
-
while (not timer::kernel_timers().empty()) {
delete timer::kernel_timers().top().second;
timer::kernel_timers().pop();
context::ContextFactory* get_context_factory() const { return context_factory_; }
void set_context_factory(context::ContextFactory* factory) { context_factory_ = factory; }
bool has_context_factory() const { return context_factory_ != nullptr; }
- void destroy_context_factory()
- {
- delete context_factory_;
- context_factory_ = nullptr;
- }
void context_mod_init() const;
/**