Problem 793 - memory leak in G4SingleParticleSource
Summary: memory leak in G4SingleParticleSource
Status: RESOLVED LATER
Alias: None
Product: Geant4
Classification: Unclassified
Component: event (show other problems)
Version: 7.1
Hardware: All All
: P2 normal
Assignee: flei
URL:
Depends on:
Blocks:
 
Reported: 2005-09-09 12:52 CEST by jasondet
Modified: 2006-02-19 10:20 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 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