Problem 793

Summary: memory leak in G4SingleParticleSource
Product: Geant4 Reporter: jasondet
Component: eventAssignee: flei
Status: RESOLVED LATER    
Severity: normal    
Priority: P2    
Version: 7.1   
Hardware: All   
OS: All   

Description jasondet 2005-09-09 12:52:06 CEST
biasRndm and *Generator, allocated in the constructor, are never deallocated.
This is a memory leak if one calls G4GeneralParticleSource::DeleteaSource() (if
DeleteaSource() did not have a memory leak itself and actually deleted the
appropriate G4SingleParticleSource; see bug report 792). I recommend
deallocating the memory for these objects with appropriate calls to delete in
the destructor.

Jason
Comment 1 flei 2005-09-29 04:41:59 CEST
The memory leak is very limited and will not cause too much a problem in most
simulations. Will look into this later.
Jason, it seems you may already have this fixed. If so can you send me your
correced code?

Fan