This project has moved and is read-only. For the latest updates, please go here.

Memory leak after converting mp4 to mp3 in

Dec 4, 2014 at 7:01 AM
Edited Dec 4, 2014 at 7:02 AM
I am using NAudio to convert an mp4 file to mp3 by using the Encoder. And then I am deleting the original mp4 file.

This is my code:
using NAudio.Wave;

static void Main()
    using (MediaFoundationReader reader = new MediaFoundationReader("a.mp4"))
        MediaFoundationEncoder.EncodeToMp3(reader, "a.mp3");
The problem is that the original file "a.mp4" doesn't delete. No exceptions are thrown. It finally deletes when I close the program / stop debugging in VS

Any ideas what is going on?
Jan 9, 2015 at 11:30 PM
Sorry, no ideas. But it's unlikely to be anything to do with NAudio if File.Delete is not throwing exceptions. Maybe ask this one on StackOverflow