title: C# System.OutOfMemoryException was unhandled
body: <p>i use foreach to read all the image from a folder</p>
  
  <pre><code>        string[] filePaths = Directory.GetFiles(Workspace.InputFolder, "*.*");
          foreach (string imageFile in filePaths)
          {
              // Some Process here, the output are correct, just after output 
                 the error happen
          }
  </code></pre>
  
  <p>But it come out error</p>
  
  <pre><code>System.OutOfMemoryException was unhandled
    Message=Out of memory.
    Source=System.Drawing 
  </code></pre>
  
  <p>Is the problem cause by the foreach loop keep looping after the process finish?
  What should i do for releasing the memory?
  Thanks.</p>