PMTWaveform has a member fPulse, and this is not properly freed when the PMTWaveform de-allocates. Fixing this requires some re-design of how this class used, since this class is copied on the stack as a return (so the old instance will be de-allocated after its copied). I think this class should instead be passed as a pointer, and the fPulse field should be modified to become a vector of PMTPulses, not pointers to them.
PMTWaveform
has a memberfPulse
, and this is not properly freed when the PMTWaveform de-allocates. Fixing this requires some re-design of how this class used, since this class is copied on the stack as a return (so the old instance will be de-allocated after its copied). I think this class should instead be passed as a pointer, and thefPulse
field should be modified to become a vector of PMTPulses, not pointers to them.