Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Release memory after last use only.
[simgrid.git] / src / simix / ActorImpl.cpp
index 3b64841..17c34d2 100644 (file)
@@ -461,8 +461,8 @@ ActorImpl* ActorImpl::start(const simix::ActorCode& code)
   xbt_assert(code && host_ != nullptr, "Invalid parameters");
 
   if (not host_->is_on()) {
-    intrusive_ptr_release(this);
     XBT_WARN("Cannot launch actor '%s' on failed host '%s'", name_.c_str(), host_->get_cname());
+    intrusive_ptr_release(this);
     std::rethrow_exception(
         std::make_exception_ptr(simgrid::HostFailureException(XBT_THROW_POINT, "Cannot start actor on failed host.")));
   }