I have a loop where quite a lot of AudioFormatReader objects are created using
AudioFormatManager.createReaderFor(InputStream). The docs for that method says:
If it returns a reader, it’s the caller’s responsibility to delete the reader.
But if I delete the reader, either explicitly using
delete or by wrapping it in a ScopedPointer, the program will crash. If I omit that part, everything appears to work fine.
Although I’m a bit concerned that there’s a memory leak, since the docs explicitly tell me to delete it?