simgrid::s4u::Actor::on_destruction.connect([](simgrid::s4u::Actor const& actor) {
// free the data if a function was provided
simgrid::s4u::Actor::on_destruction.connect([](simgrid::s4u::Actor const& actor) {
// free the data if a function was provided
/** @brief Add a function to the list of "on_exit" functions for the current process.
* The on_exit functions are the functions executed when your process is killed.
* You should use them to free the data used by your process.
/** @brief Add a function to the list of "on_exit" functions for the current process.
* The on_exit functions are the functions executed when your process is killed.
* You should use them to free the data used by your process.