From: Arnaud Giersch Date: Fri, 8 Mar 2019 13:19:50 +0000 (+0100) Subject: Release memory after last use only. X-Git-Tag: v3_22~135 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/868e00397426cbf869f0c96b7aaf8d36b243c6e2 Release memory after last use only. --- diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index 3b64841d6a..17c34d2880 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -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."))); }