From: Martin Quinson Date: Wed, 21 Jun 2017 05:34:49 +0000 (+0200) Subject: make it possible to free the storage content from the C code X-Git-Tag: v3.16~15 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d7c66d3efba0f679851f5b67bbd8da95d46bea91?hp=3fb312ce54ba8cfa3f14bba64aa5f5a6f0299970 make it possible to free the storage content from the C code --- diff --git a/src/msg/msg_io.cpp b/src/msg/msg_io.cpp index bfb2f3d979..b636be848d 100644 --- a/src/msg/msg_io.cpp +++ b/src/msg/msg_io.cpp @@ -475,7 +475,7 @@ xbt_dict_t MSG_storage_get_content(msg_storage_t storage) xbt_dict_t content_dict = xbt_dict_new_homogeneous(&free); for (auto entry : *content) { - sg_size_t* psize = new sg_size_t; + sg_size_t* psize = static_cast(malloc(sizeof(sg_size_t))); *psize = entry.second; xbt_dict_set(content_dict, entry.first.c_str(), psize, nullptr); }