Leak detector jasserts in shutdown for each AudioFormat

Compiling for XCode, just downloaded the newest Juce.

Is the leak detector new? Is there a way to toggle it on or off?

It’s finding several errors, one of which I fixed quickly, some of which I haven’t addressed and might be hard (it’s leaking five StringArrays, supposedly), but this one doesn’t seem to be my issue.

All I ever do is AudioFormatManager::getInstance()->registerBasicFormats() and yet the four “standard” formats are each reporting one leak each.

EDIT: if I call AudioFormatManager::deleteInstance() before shutting down, the error goes away.

yeah, the AudioFormatManager won’t automatically delete itself.

TBH that class probably shouldn’t be a singleton - it’s better to use your own instance of it, and there’s no reason why it’d be better to use a shared instance…

Oh, good to know then, and easy enough to fix.

The leak detector is a great feature, congrats!

Yes, I was quite proud of that little class - really simple, but does the job well.