The temporary *.tmp file created by the AudioFile class, when saving*.wavfiles, never gets deleted. Even toughtmp.delete()` is called.
You also can not remove it manually because the java process is still holding a reference.
This is because the input stream, which is used to copy the *.tmp file to the actual *.wav file is never closed.
It is fixed by closing the AudioInputStream after AudioSystem.write(...) has written the *.wav file (see here).
The temporary
*.tmp
file created by theAudioFile
class, when saving*.wavfiles, never gets deleted. Even tough
tmp.delete()` is called. You also can not remove it manually because the java process is still holding a reference.This is because the input stream, which is used to copy the
*.tmp
file to the actual*.wav
file is never closed.It is fixed by closing the
AudioInputStream
afterAudioSystem.write(...)
has written the*.wav
file (see here).