title: My code work only on line by line executing
body: <p>Here is my code:</p>
  
  <pre><code>PdfSharp.Pdf.PdfDocument document = PdfReader.Open(filePath);
  
  document.Info.Author = "";
  document.Info.Title = "";
  document.Info.Creator = "";
  
  document.Close();
  document.Dispose();
  
  document.Save(filePath);
  </code></pre>
  
  <p>When I execute it line by line in Debug mode it works perfect. But, when I run it without line by line executing I get an error 'the filePath is used by another process' on Save operation.</p>
  
  <p>What is the problem?</p>