X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/442a7c3376eb3a0bdde33e546a8146690c677466..9c901db76cd719b621b6d102eb621db57076f956:/examples/s4u/actor-create/s4u_actor-create.cpp diff --git a/examples/s4u/actor-create/s4u_actor-create.cpp b/examples/s4u/actor-create/s4u_actor-create.cpp index f4146a59d0..b822e63286 100644 --- a/examples/s4u/actor-create/s4u_actor-create.cpp +++ b/examples/s4u/actor-create/s4u_actor-create.cpp @@ -30,9 +30,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor_create, "The logging channel used in this class Sender { public: std::string msg = "GaBuZoMeu"; - explicit Sender(){ - /* Constructor used when no parameter is passed to the actor */ - }; + explicit Sender() = default; explicit Sender(std::vector args) { /* This constructor is used when we pass parameters to the actor */ @@ -79,6 +77,8 @@ public: char* msg1 = static_cast(simgrid::s4u::this_actor::recv(mailbox)); char* msg2 = static_cast(simgrid::s4u::this_actor::recv(mailbox)); XBT_INFO("I received '%s' and '%s'", msg1, msg2); + xbt_free(msg1); + xbt_free(msg2); XBT_INFO("I'm done. See you."); } };