diff --git a/CalibFormats/HcalObjects/interface/HcalDbService.h b/CalibFormats/HcalObjects/interface/HcalDbService.h index 0087f1354195c..92bc4193bfce6 100644 --- a/CalibFormats/HcalObjects/interface/HcalDbService.h +++ b/CalibFormats/HcalObjects/interface/HcalDbService.h @@ -27,6 +27,7 @@ class HcalTopology; class HcalDbService { public: HcalDbService (const edm::ParameterSet&); + ~HcalDbService(); const HcalTopology* getTopologyUsed() const; diff --git a/CalibFormats/HcalObjects/src/HcalDbService.cc b/CalibFormats/HcalObjects/src/HcalDbService.cc index a008484d516fd..8e857dcdfb479 100644 --- a/CalibFormats/HcalObjects/src/HcalDbService.cc +++ b/CalibFormats/HcalObjects/src/HcalDbService.cc @@ -29,6 +29,11 @@ HcalDbService::HcalDbService (const edm::ParameterSet& cfg): mCalibSet(nullptr), mCalibWidthSet(nullptr) {} +HcalDbService::~HcalDbService() { + delete mCalibSet.load(); + delete mCalibWidthSet.load(); +} + const HcalTopology* HcalDbService::getTopologyUsed() const { if (mPedestals && mPedestals->topo()) return mPedestals->topo(); if (mGains && mGains->topo()) return mGains->topo();