+ undaemonize();
+ s4u::Actor::on_termination(*get_ciface());
+
+ while (not mailboxes_.empty())
+ mailboxes_.back()->set_receiver(nullptr);
+}
+
+/* Do all the cleanups from the actor context. Warning, the simcall mechanism was not reignited so doing simcalls in
+ * this context is dangerous */
+void ActorImpl::cleanup_from_self()
+{
+ xbt_assert(not ActorImpl::is_maestro(), "Cleanup_from_self called from maestro on '%s'", get_cname());
+ set_to_be_freed();
+