I have a Python script that generates a .wav (externally) and places it in the sequence editor. Then, I would like to be able to remove the .wav later. So first I remove the sequence from the editor and then I try to remove it on the filesystem. This works except once I play the sound inside Blender. Windows says that it's being used by another process and I can't remove it. I tried to unlink the sound by doing:
But it has no effect. This line removes it from bpy.data.sounds but I can't get Blender to let it go. I'm doing the same process with a .avi video and I don't have this problem. Any advice?