Problem 1584 - Memory leak in G4IntraNucleiCascader.cc
Summary: Memory leak in G4IntraNucleiCascader.cc
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/models/cascade (show other problems)
Version: 10.0
Hardware: All All
: P5 normal
Assignee: Michael Kelsey
URL:
Depends on:
Blocks:
 
Reported: 2014-03-06 12:11 CET by Alberto.Ribon
Modified: 2014-03-12 13:37 CET (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
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,