med1844 / 2022-MUSI6106

Template project for assignments and exercises for the class MUSI6106
GNU General Public License v3.0
0 stars 0 forks source link

make sure to set pointers to zero after deletion #22

Open alexanderlerch opened 2 years ago

alexanderlerch commented 2 years ago

https://github.com/medioqrity/2022-MUSI6106/blob/04995c5937e11713dd3747ea65f37650d2eec19f/src/FastConv/Convolver.cpp#L182

otherwise you run into problems, e.g., when reset is called twice

med1844 commented 2 years ago

I'm also considering changing them to std::unique_ptr<std::vector> to handle pointers more elegantly and delete all allocated memories & objects even if exceptions occur.

alexanderlerch commented 2 years ago

Absolutely.