Commit 2bf3a15f authored by Frank Gaede's avatar Frank Gaede
Browse files

minor memory handling fix

parent 86f0c55d
......@@ -200,13 +200,13 @@ G4VPhysicalVolume* SimpleCaloDetectorConstruction::Construct()
G4ThreeVector layerPosA( 0,0, ( j - nbOfLayers / 2 ) * (calo_zAbs + calo_zSens ) + calo_zAbs/2 ) ;
G4ThreeVector layerPosS( 0,0, ( j - nbOfLayers / 2 ) * (calo_zAbs + calo_zSens ) + calo_zAbs + calo_zSens/2 ) ;
new G4PVPlacement(0, // no rotation
layerPosA, // translation
fLayerLogA,
"layerA", // its name
caloLog,
false,
j);
auto* g4p = new G4PVPlacement(0, // no rotation
layerPosA, // translation
fLayerLogA,
"layerA", // its name
caloLog,
false,
j);
fLayerPhys[n]
= new G4PVPlacement(0, // no rotation
......@@ -216,6 +216,8 @@ G4VPhysicalVolume* SimpleCaloDetectorConstruction::Construct()
caloLog,
false,
j);
delete g4p ;
}
G4cout << "There are " << nbOfLayers <<
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment