Problem 1584

Summary: Memory leak in G4IntraNucleiCascader.cc
Product: Geant4 Reporter: Alberto.Ribon
Component: processes/hadronic/models/cascadeAssignee: Michael Kelsey <kelsey>
Status: RESOLVED FIXED    
Severity: normal CC: Alberto.Ribon, Federico.Carminati
Priority: P5    
Version: 10.0   
Hardware: All   
OS: All   

Description Alberto.Ribon 2014-03-06 12:11:39 CET
Federico Carminati has found a memory leak in G4IntraNucleiCascader.cc.
He was using G4 9.6.p02, but I think that the problem is there also in G4 10.0.

The fix is simple: in the method:

  void G4IntraNucleiCascader::
  decayTrappedParticle(const G4CascadParticle& trapped)

add the following line at the very end:

  delete daughters;
Comment 1 Michael Kelsey 2014-03-11 01:32:29 CET
Thanks for the report!  It will be fixed in the next release, and a patch can be made as well.
Comment 2 Federico.Carminati 2014-03-12 13:37:53 CET
Thanks a lot. I would be in favour of having the patch as well.Best,