title: Dispose() for cleaning up managed resources?
body: <p>In <a href="https://stackoverflow.com/a/1708552/2098335">this answer</a> I found,</p>
  
  <blockquote>
    <p>Cleanup the unmanaged resources in the Finalize method and the
    managed ones in the Dispose method, when the Dispose/Finalize pattern
    has been used in your code.</p>
  </blockquote>
  
  <p>And later I found <a href="http://www.devx.com/dotnet/Article/33167/0/page/3" rel="noreferrer">this nice article</a> about finalize and dispose and got a clear idea about them.  The article has the following code(<strong>Page 3</strong>), to explain the concepts:</p>
  
  <pre><code>class Test : IDisposable
  {
      private bool isDisposed = false;
  
      ~Test()
      {
         Dispose(false);
      }
  
      protected void Dispose(bool disposing)
      {
         if (disposing)
         {
            // Code to dispose the managed resources of the class
         }
         // Code to dispose the un-managed resources of the class
  
         isDisposed = true;
      }
  
      public void Dispose()
      {
         Dispose(true);
         GC.SuppressFinalize(this);
      }
  }
  </code></pre>
  
  <p>But below that, the same note (which I included in the beginning of this question) appears.</p>
  
  <blockquote>
    <p>The Dispose/Finalize Pattern
      Microsoft recommends that you implement both Dispose and Finalize when working with unmanaged resources. The correct sequence then would
    be for a developer to call Dispose. The Finalize implementation would
    run and the resources would still be released when the object is
    garbage collected even if a developer neglected to call the Dispose
    method explicitly. Francesco Balena writes in his blog "the
    Dispose/Finalize pattern should be used only when your type invokes
    unmanaged code that allocates unmanaged resources (including unmanaged
    memory) and returns a handle that you must use eventually to release
    the resource. Both dispose and finalize must chain up to their parent
    objects by calling their parent's respective methods after they have
    disposed or finalized their own members".
          <strong>Simply put, cleanup the unmanaged resources in the Finalize method and  the managed ones in the Dispose method, when the
    Dispose/Finalize   pattern has been used in your code.</strong></p>
  </blockquote>
  
  <p>Now I am confused again. In the entire article and in the code sample, it is shown that unmanaged resources should be freed in <code>Dispose()</code>. But then what is the relevance of that comment?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>As it is confirmed that this line : </p>
  
  <blockquote>
    <p>Simply put, cleanup the unmanaged resources in the Finalize method and
    the managed ones in the Dispose method, when the Dispose/Finalize
    pattern has been used in your code</p>
  </blockquote>
  
  <p>is erroneous, I edited <a href="https://stackoverflow.com/a/1708552/2098335">this answer</a>.</p>