X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4d9d6eead8617ae15be9780a375ac0681c076d79..4a69abcc786d029bd2962537f767d12a0f808d11:/src/surf/storage_interface.cpp diff --git a/src/surf/storage_interface.cpp b/src/surf/storage_interface.cpp index 831e5143d0..70cb9d709d 100644 --- a/src/surf/storage_interface.cpp +++ b/src/surf/storage_interface.cpp @@ -78,7 +78,7 @@ Storage::~Storage(){ storageDestructedCallbacks(this); if (content_ != nullptr) { for (auto entry : *content_) - free(entry.second); + delete entry.second; delete content_; } free(typeId_); @@ -140,16 +140,10 @@ void Storage::turnOff() { } } -xbt_dict_t Storage::getContent() +std::map* Storage::getContent() { /* For the moment this action has no cost, but in the future we could take in account access latency of the disk */ - - xbt_dict_t content_dict = xbt_dict_new_homogeneous(nullptr); - - for (auto entry : *content_) { - xbt_dict_set(content_dict, entry.first.c_str(), entry.second, nullptr); - } - return content_dict; + return content_; } sg_size_t Storage::getFreeSize(){