Problem 1424 - Memory leak in G4GGNuclNuclCrossSection::GetZandACrossSection in geant4..9.6
Summary: Memory leak in G4GGNuclNuclCrossSection::GetZandACrossSection in geant4..9.6
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/cross_sections (show other problems)
Version: 9.6
Hardware: All All
: P5 major
Assignee: dennis.herbert.wright
URL:
Depends on:
Blocks:
 
Reported: 2013-01-10 17:13 CET by John Watts
Modified: 2013-01-17 19:17 CET (History)
0 users

See Also:


Attachments
valgrind output identifying leak location (35.10 KB, text/plain)
2013-01-10 17:13 CET, John Watts
Details

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