Message: class instantiated twice in Brachytherapy example Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question class instantiated twice in Brachytherapy example 

Keywords: memory management, brachytherapy
Forum: Documentation and Examples
Date: 20 Jul, 2005
From: Luís Perles <Luís Perles>

Hello,

I was studying the Brachytherapy example when I found that the BrachyDetectorConstruction is instantiated twice. The first instance is done by the main() in the line 88 and sent to Runmanager in line 90, as follow: BrachyDetectorConstruction *pDetectorConstruction = new BrachyDetectorConstruction (sensitiveDetectorName); .... pRunManager->SetUserInitialization I(pDetectorConstruction);

And the second one is in BrachyRunAction line 64: detector = new BrachyDetectorConstruction (sensitiveDetectorName);

Doesn't it mean a memory leak or misuse?

If not, which one is used to transportation?

Cheers, Luís A. Perles

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

1 Ok: Re: class instantiated twice in Brachytherapy example   (susanna guatelli - 25 Jul, 2005)
(_ None: Re: class instantiated twice in Brachytherapy example   (Luís Perles - 29 Jul, 2005)
 Add Message Add Message
to: "class instantiated twice in Brachytherapy example"

 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 ]