If a size of allModels is not 0, the while loop in the destructor becomes an infinite loop. 46 G4HadronicInteractionRegistry::~G4HadronicInteractionRegistry() 47 { 48 while(allModels.size()!=0) 49 { 50 delete allModels.front(); 51 } 52 } Is this correct? or 48 while(allModels.size()!=0) 49 { 50 allModels.erase( allModels.begin() ); 51 } is a correct implementation what you want to do? Tatsumi
Hi Tatsumi, I am stunned. The code you show me should result on a loop in every single job. I'll have to find out, why this is not the case... Regards, Hans-Peter.
Hi Tatsumi, I checked, and found that it is ok. The code as it is gives the desired behavior. Many greetings, Hans-Peter.