Skip to content

SlimCopy : The copy ctor should already copy the summary if other has one

The copy ctor should already call https://acode-browser1.usatlas.bnl.gov/lxr/source/athena/Tracking/TrkEvent/TrkTrack/src/Track.cxx#0123

So

 std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(track);
-  // only attempt to copy the summary if the track has it!
-  if (track.trackSummary()!=nullptr){
-    newTrack->m_trackSummary = new Trk::TrackSummary(*(track.trackSummary()));
 }

the removed lines should not be needed and actually could potentially lead to memory leak (this method is not used heavily from what I can see)

Merge request reports