-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include "Launcher.hxx"
#include <iostream>
#include <string>
+#include <memory>
-int main(int argc, char** argv)
+int main()
{
std::string xmlfile("");
try {
Launcher_cpp *lcpp = new Launcher_cpp();
- ResourcesManager_cpp *rcpp = new ResourcesManager_cpp();
+ std::shared_ptr<ResourcesManager_cpp> rcpp(new ResourcesManager_cpp());
lcpp->SetResourcesManager(rcpp);
if(!getenv("KERNEL_ROOT_DIR"))
throw ResourcesException("you must define KERNEL_ROOT_DIR environment variable!! -> cannot load testLauncher.xml");
long jobid = lcpp->createJobWithFile(xmlfile.c_str(),"localhost");
lcpp->launchJob(jobid);
delete lcpp;
- delete rcpp;
std::cout << "test OK" << std::endl;
} catch ( const ResourcesException &ex) {
std::cout << ex.msg.c_str() << std::endl;