title: How do I release a file held by BitMap class
body: <p>I have the following code:</p>
  
  <pre><code>Bitmap image = new Bitmap(filePath);
  ...
  image.Save(someOtherPath);
  image.Dispose();
  File.Delete(filePath);
  File.Move(someOtherPath, filePath);
  </code></pre>
  
  <p>The File.Delete line raises the following error:</p>
  
  <pre><code>The process cannot access the file '...' because it is being used by another process.
  </code></pre>
  
  <p>How do I get the C# to release the lock it has on the file?</p>