Problem 1424

Summary: Memory leak in G4GGNuclNuclCrossSection::GetZandACrossSection in geant4..9.6
Product: Geant4 Reporter: John Watts <john.w.watts>
Component: processes/hadronic/cross_sectionsAssignee: dennis.herbert.wright
Status: RESOLVED FIXED    
Severity: major    
Priority: P5    
Version: 9.6   
Hardware: All   
OS: All   
Attachments: valgrind output identifying leak location

Description John Watts 2013-01-10 17:13:25 CET
Created attachment 199 [details]
valgrind output identifying leak location

When we transfers an application base on one of the HandsOn source codes from geant4.9.5 to geant4.9.6 the code appear to have a memory leak.
We attached it to valgrind and found the leak. I have attached the valgrind output. In G4GGNuclNuclCrossSection::GetZandACrossSection at line 138  and a oouple of line later variables are placed on the stack with a new and never deleted. There does not appear to be a reason why these should not be local.
This section of code was added in geant4.9.6.
Comment 1 dennis.herbert.wright 2013-01-10 19:36:43 CET
A possible solution has been found.  Testing is underway and we'll keep you informed.
Comment 2 dennis.herbert.wright 2013-01-17 19:17:48 CET
A fix has been found and tested by Alberto Ribon.  This problem is identical to that in bug report 1413.
The solution will be included in the next Geant4 patch.