title: Am I implementing IDisposable correctly?
body: <p>This class uses a <code>StreamWriter</code> and therefore implements <code>IDisposable</code>.</p>
  
  <pre><code>public class Foo : IDisposable
  {
      private StreamWriter _Writer;
  
      public Foo (String path)
      {
          // here happens something along the lines of:
          FileStream fileWrite = File.Open (path, FileMode.OpenOrCreate, FileAccess.Write, FileShare.ReadWrite);
          _Writer = new StreamWriter (fileWrite, new ASCIIEncoding ());
      }
  
      public void Dispose ()
      {
          Dispose (true);
          GC.SuppressFinalize (this);
      }
  
      ~Foo()
      {
          Dispose (false);
      }
  
      protected virtual void Dispose (bool disposing)
      {
          if (_Disposed) {
              return;
          }
          if (disposing) {
              _Writer.Dispose ();
          }
          _Writer = null;
          _Disposed = true;
      }
      private bool _Disposed;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Is there any issue with the current implementation? I.e., do I have to release the underlying <code>FileStream</code> manually? Is <code>Dispose(bool)</code> written correctly?</p>