title: WinForms Dialog Form -- Close or Dispose?
body: <p>I've inherited some code and wanted to run this modification by you all, my concern is memory management. </p>
  
  <p>Let us say I have a "base" Form with a bunch of buttons that open "dialog" forms.  What is the recommended pattern for opening the dialog forms?  Currently we display the "dialog" form like so (in the "base" Form code, upon button click):</p>
  
  <pre><code>ChangePasswordForm frm = new ChangePasswordForm();
  frm.ShowDialog();
  </code></pre>
  
  <p>Then close it like so (in the "dialog" form code):</p>
  
  <pre><code>private void bCancel_Click(object sender, EventArgs e)
  {
    this.Close();
    //this.Dispose();  &lt;-- this is what I am considering adding.
  }
  </code></pre>
  
  <p>My rationale for adding Dispose is that I am worried if this form is displayed and closed many times that each time a <em>new</em> instance of the form is created and its resources are never really released -- is this correct?  Also, if the form has the "close" X in the top right, should I put a Dispose() call in the FormClosed event as well?</p>
  
  <p>Thanks in advance.</p>