Skip to content

Commit

Permalink
Merge pull request #8 from alibuild/alibot-cleanup-13769
Browse files Browse the repository at this point in the history
Please consider the following formatting changes to #13769
  • Loading branch information
jackal1-66 authored Dec 12, 2024
2 parents e81a76f + d32b4d1 commit 612db1b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
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

0 comments on commit 612db1b

Please sign in to comment.