Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update python/clusters-multicpu to the new API.
[simgrid.git] / examples / cpp / io-file-system / s4u-io-file-system.cpp
index ef572828043709f7d0b3bdc18165622f7f686deb..40e0048e09abb9c576c8d3b9d675d0e5ffe59fc3 100644 (file)
@@ -58,9 +58,8 @@ public:
 
     // Test attaching some user data to the file
     file->set_data(new std::string("777"));
-    const auto* file_data = file->get_data<std::string>();
+    auto file_data = file->get_unique_data<std::string>();
     XBT_INFO("User data attached to the file: %s", file_data->c_str());
-    delete file_data;
 
     // Close the file
     file->close();