Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing memory leak in EgammaHLTNxNClusterProducer :75X #10539

Merged
merged 1 commit into from Aug 4, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -22,6 +22,8 @@
#include "RecoEgamma/EgammaHLTProducers/interface/EgammaHLTNxNClusterProducer.h"
#include "TVector3.h"

#include <memory>

EgammaHLTNxNClusterProducer::EgammaHLTNxNClusterProducer(const edm::ParameterSet& ps):
doBarrel_ (ps.getParameter<bool>("doBarrel")),
doEndcaps_ (ps.getParameter<bool>("doEndcaps")),
Expand Down Expand Up @@ -179,13 +181,13 @@ void EgammaHLTNxNClusterProducer::makeNxNClusters(edm::Event &evt, const edm::Ev
es.get<CaloGeometryRecord>().get(geoHandle);

const CaloSubdetectorGeometry *geometry_p;
CaloSubdetectorTopology *topology_p;
std::unique_ptr<CaloSubdetectorTopology> topology_p;
if (detector == reco::CaloID::DET_ECAL_BARREL) {
geometry_p = geoHandle->getSubdetectorGeometry(DetId::Ecal, EcalBarrel);
topology_p = new EcalBarrelTopology(geoHandle);
topology_p.reset(new EcalBarrelTopology(geoHandle));
}else {
geometry_p = geoHandle->getSubdetectorGeometry(DetId::Ecal, EcalEndcap);
topology_p = new EcalEndcapTopology(geoHandle);
topology_p.reset(new EcalEndcapTopology(geoHandle));
}

const CaloSubdetectorGeometry *geometryES_p;
Expand Down