Open h4yn0nnym0u5e opened 1 year ago
Above is wrong, I read the code incorrectly and because you instantiate a new flashloader on each sample set load, the sample memory doesn’t leak. However, the heap memory does leak very slowly, because a new audiosample struct is allocated on every load. So when doing a load, you need something like if (samps[i] != nullptr) delete samps[i];
See line: https://github.com/otem/Eurorack/blob/1855b2d3cbb932842a832d948c6be230be6e3407/Samps%202/samps2/files.ino#L46
Suggest you re-implement using
extmem_malloc()
andextmem_free()
. As I don't have the relevant hardware this is hard for me to fix and do a PR, it would be untested.