Problem 568

Summary: memory leaks in Penelope physics
Product: Geant4 Reporter: marcus.h.mendenhall
Component: processes/electromagnetic/lowenergyAssignee: Maria.Grazia.Pia
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: other   
Hardware: All   
OS: All   
URL: http://arago.fel.vanderbilt.edu/~marcus/G4*.*

Description marcus.h.mendenhall 2004-01-19 12:08:24 CET
The G4Penelope... modules contain two memory leaks, due to failure to clean up some
pointers allocated by foo *xxx=new xxx().  In the cases I corrected, it may be
cleaner programming ultimately to replace this construct with an automatic variable
so the automatic destructors handle the situation correctly.  However, for the moment
I have provided versions which use the current construct, and just make sure
the pointers are always explicitly freed.

The classes affected are G4PenelopeInterpolator and G4PenelopeIonisation.

corrected versions of these files can be found at:
http://arago.fel.vanderbilt.edu/~marcus/G4Penelope*.*

Please look at these and merge them back into the main tree as you see fit.
Comment 1 pia 2004-01-19 12:13:59 CET
The memory leaks have already been identified and corrected by the code
developer. A corrected version of the code will be available in next Geant4 beta
release, and, of course, in next public release.

Best wishes,
Maria Grazia Pia