diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx index 4bf8325d4afe37b624477a2d797723e8ce8902fd..d12909b845c2b736b8944b519f66c9a93d16f2ed 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.cxx @@ -58,9 +58,13 @@ namespace Muon { } StatusCode MuPatCandidateTool::finalize() { + return StatusCode::SUCCESS; + } + + StatusCode MuPatCandidateTool::stop() { // Clean up all garbage now. - // If we leave it for the dtor, we may end up with dangling references + // If we leave it for later, we may end up with dangling references // to Surface objects that have already been deleted. for (CacheEntry& ent : m_cache) { ent.cleanUp(); diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.h index 9408b03df006abd7444dad72da8a6ba1340789d7..da0186c3a723ffc399ca305b01ae7c0405782c2b 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools/src/MuPatCandidateTool.h @@ -65,13 +65,16 @@ namespace Muon { MuPatCandidateTool(const std::string&, const std::string&, const IInterface*); /** destructor */ - ~MuPatCandidateTool() = default; + virtual ~MuPatCandidateTool() = default; /** initialize method, method taken from bass-class AlgTool */ - StatusCode initialize(); + virtual StatusCode initialize() override; /** finialize method, method taken from bass-class AlgTool */ - StatusCode finalize(); + virtual StatusCode finalize() override; + + /** stop method, used to clean up garbage */ + virtual StatusCode stop() override; /** @brief access to tool interface */ static const InterfaceID& interfaceID() { return IID_MuPatCandidateTool; }