Message: Memory Leak with Muons Decaying Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Memory Leak with Muons Decaying 

Forum: Particles
Date: 13 Feb, 2007
From: Lance Simms <Lance Simms>

I am fairly certain that there is a memory leak in the G4Decay class in the version of GEANT4 I am using.

I am using ExN02 from the novice examples. When I change the generated particle to muons, the memory used by ExN02 grows linearly with respect to time. If I remove the following lines from ExN02PhysicsList.cc

  // Add Decay Process
  G4Decay* theDecayProcess = new G4Decay("decay");
  theParticleIterator->reset();
  while( (*theParticleIterator)() ){
    G4ParticleDefinition* particle = theParticleIterator->value();
    G4ProcessManager* pmanager = particle->GetProcessManager();
    if (theDecayProcess->IsApplicable(*particle)) {
      pmanager ->AddProcess(theDecayProcess);
      pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
      pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
    }
  }

the memory leak goes away.

I am currently using the installation at SLAC under /afs/slac/geant4/vol4. This is geant4-08-00-p01-patch-00.

Is this an issue with the version I am using? Has anyone seen this before?

Help would be greatly appreciated,

Lance

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Memory Leak with Muons Decaying   (Makoto Asai - 13 Feb, 2007)
 Add Message Add Message
to: "Memory Leak with Muons Decaying"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]