From 62374adb9319c312f80dd1f62c9378727161bd1a Mon Sep 17 00:00:00 2001 From: Gene Van Buren <85305093+genevb@users.noreply.github.com> Date: Fri, 20 May 2022 18:52:33 -0400 Subject: [PATCH] Fix memory issue in destruction of StBTofGeometry (#355) --- StRoot/StBTofUtil/StBTofGeometry.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/StRoot/StBTofUtil/StBTofGeometry.h b/StRoot/StBTofUtil/StBTofGeometry.h index c328703247e..7695e835f0c 100644 --- a/StRoot/StBTofUtil/StBTofGeometry.h +++ b/StRoot/StBTofUtil/StBTofGeometry.h @@ -33,7 +33,6 @@ #include "StThreeVectorD.hh" #include "StHelixD.hh" #include "TVolume.h" -#include "TVolumePosition.h" #include "TVolumeView.h" #include "TVolumeViewIter.h" #include "StMaker.h" @@ -49,7 +48,6 @@ class StBTofGeomTray; class StBTofGeomSensor; class StBTofGeometry; -class TVolumeView; class TGeoPhysicalNode; class TGeoManager; @@ -92,8 +90,8 @@ class StBTofNode : public TObject { StBTofNode() {} ~StBTofNode() { if ( TestBit(kIsOwner) ) { + if (pView != fView->GetPosition()) delete pView; delete fView; - delete pView; delete mMasterNode; delete mTVolume; delete mTShape;