rat-pac / ratpac-two

Open source edition of RAT-PAC
Other
11 stars 23 forks source link

Memory leak in `daq/PMTWaveform` #133

Closed JamesJieranShen closed 3 months ago

JamesJieranShen commented 3 months ago

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.

JamesJieranShen commented 3 months ago

Fixed -- #134