Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2023.
[simgrid.git] / teshsuite / s4u / vm-suicide / vm-suicide.cpp
index cce8170..733d9a5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2021. The SimGrid Team. All rights reserved.               */
+/* Copyright (c) 2021-2023. The SimGrid Team. All rights reserved.               */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -66,7 +66,7 @@ static void life_cycle_manager()
 static void master(const std::vector<simgrid::s4u::Host*>& hosts)
 {
   for (int i = 1; i <= 2; i++) {
-    auto* vm = new simgrid::s4u::VirtualMachine("test_vm", hosts.at(i), 4);
+    auto* vm = hosts.at(i)->create_vm("test_vm", 4);
     vm->start();
     simgrid::s4u::Actor::create("life_cycle_manager-" + std::to_string(i), vm, life_cycle_manager);