Problem 711 - Memory Leak in G4NuclearDecay
Summary: Memory Leak in G4NuclearDecay
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/models (show other problems)
Version: 6.2
Hardware: PC Linux
: P2 normal
Assignee: flei
URL:
Depends on:
Blocks:
 
Reported: 2005-01-14 06:33 CET by d.kruecker
Modified: 2005-03-21 01:54 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description d.kruecker 2005-01-14 06:33:52 CET
There is a memory leak in G4NuclearDecay::DecayIt() if the daughter nucleus is
in an excitate state.
This can be observed in e.g. examples/extended/radioactivedecay/exrdm/
if the ion in the exrdm.in is replace by an isotop where the daughter nucleus
emitts gammas, e.g Y86 (/gps/ion 39 86).
The job increases by about 12MB/100K events.

The problem seems to be at (Geant4.7.0/4.6.2)
G4NuclearDecay.cc line 459:
      dynamicDaughter = new G4DynamicParticle
   (theIonTable->GetIon(daughterZ,daughterA,finalDaughterExcitation),
    daughterMomentum1);
There should be a
 delete dynamicDaughter;
before the pointer is reused.

Best regards,
Dirk Kruecker
Comment 1 d.kruecker 2005-01-17 01:20:59 CET
Sorry,

I truncated the file name.
The correct name is

 G4NuclearDecayChannel.cc

Dirk Kruecker
Comment 2 Hans-Peter.Wellisch 2005-02-22 03:58:59 CET
thank you Dirk, we'll correct it.
Comment 3 flei 2005-03-21 01:54:59 CET
Fixed in tag 'geant4-07-00-ref-02'