diff --git a/Generators/include/Generators/GeneratorService.h b/Generators/include/Generators/GeneratorService.h index f65a0a84f15e6..58de17c609042 100644 --- a/Generators/include/Generators/GeneratorService.h +++ b/Generators/include/Generators/GeneratorService.h @@ -60,11 +60,6 @@ class GeneratorService { public: - ~GeneratorService() - { - o2::eventgen::GeneratorFactory::cleanup(); - }; - void initService(std::string const& generatorName, std::string const& triggerName, VertexOption const& vtxOption); diff --git a/run/O2PrimaryServerDevice.h b/run/O2PrimaryServerDevice.h index c4f40442316ad..598f19a1b9f80 100644 --- a/run/O2PrimaryServerDevice.h +++ b/run/O2PrimaryServerDevice.h @@ -73,7 +73,7 @@ class O2PrimaryServerDevice final : public fair::mq::Device if (mControlThread.joinable()) { mControlThread.join(); } - o2::eventgen::GeneratorFactory::cleanup(); + delete mPrimGen; } catch (...) { } }