title: How to dispose a class in .net?
body: <p>The .NET garbage collector will eventually free up memory, but what if you want that memory back immediately? What code do you need to use in a class <code>MyClass</code> to call</p>
  
  <pre><code>MyClass.Dispose()
  </code></pre>
  
  <p>and free up all the used space by variables and objects in <code>MyClass</code>?</p>