Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Generators/include/Generators/GeneratorFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ namespace eventgen
// main purpose is to init a FairPrimGen given some (Sim)Config
struct GeneratorFactory {
static void setPrimaryGenerator(o2::conf::SimConfig const&, FairPrimaryGenerator*);
//Make destructor to delete all the pointers
~GeneratorFactory() {
// Make destructor to delete all the pointers
~GeneratorFactory()
{
cleanup();
}
static void cleanup() {
static void cleanup()
{
for (auto& gen : mBoxGenPtr) {
delete gen;
}
Expand Down
4 changes: 2 additions & 2 deletions Generators/include/Generators/GeneratorService.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ class GeneratorService
{

public:

~GeneratorService() {
~GeneratorService()
{
o2::eventgen::GeneratorFactory::cleanup();
};

Expand Down
Loading