From: Arnaud Giersch Date: Thu, 11 Feb 2021 11:13:40 +0000 (+0100) Subject: Use a smart pointer immediately. Uncomment fixed test. X-Git-Tag: v3.27~404 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/23223a7518cee91acf3d8f98464fdcd3f0d7c13f Use a smart pointer immediately. Uncomment fixed test. --- diff --git a/src/s4u/s4u_Comm.cpp b/src/s4u/s4u_Comm.cpp index 066f4f4263..2d90c616ce 100644 --- a/src/s4u/s4u_Comm.cpp +++ b/src/s4u/s4u_Comm.cpp @@ -147,7 +147,7 @@ Comm* Comm::start() xbt_assert(src_buff_ == nullptr && dst_buff_ == nullptr, "Direct host-to-host communications cannot carry any data."); pimpl_ = kernel::actor::simcall([this] { - auto res = new kernel::activity::CommImpl(this->from_, this->to_, this->get_remaining()); + kernel::activity::CommImplPtr res(new kernel::activity::CommImpl(this->from_, this->to_, this->get_remaining())); res->start(); return res; }); diff --git a/teshsuite/s4u/activity-lifecycle/testing_comm_direct.cpp b/teshsuite/s4u/activity-lifecycle/testing_comm_direct.cpp index 8ae8fbc267..7b0f0216bb 100644 --- a/teshsuite/s4u/activity-lifecycle/testing_comm_direct.cpp +++ b/teshsuite/s4u/activity-lifecycle/testing_comm_direct.cpp @@ -126,7 +126,6 @@ TEST_CASE("Activity lifecycle: direct communication activities") END_SECTION; } -/* BEGIN_SECTION("dcomm link restarted at start") { XBT_INFO("Launch a dcomm(5s), and restart the used link right after start"); @@ -142,7 +141,6 @@ TEST_CASE("Activity lifecycle: direct communication activities") END_SECTION; } -*/ BEGIN_SECTION("dcomm link restarted in middle") {