title: Does NUnit dispose of objects that implement IDisposable?
body: <p>Does NUnit dispose of objects that implement IDisposable on cleanup?  I realize there are various ways I can get an object disposed of in a method, but, for example, if the method fails prior to the object being disposed - will NUnit take care of it?  (For reference, i'm on v2.6+)</p>
  
  <p>The specific reason i'm asking is for a case where an object that implements IDisposable is created, but I am asserting that an exception is thrown upon creation.  If the test fails - and the object is created, I do not want to run into memory leak problems.</p>
  
  <p>Example:</p>
  
  <pre><code>//Will the StreamReader instance here be disposed 
  //Of if the assertion fails, and the instance is created?
  Assert.Throws&lt;Exception&gt;(() =&gt; new StreamReader(filename));
  </code></pre>
  
  <p>I realize that this will work:</p>
  
  <pre><code>Assert.Throws&lt;Exception&gt;(() =&gt; 
  {
      using (StreamReader sr = new StreamReader(filename)) { }
  }
  </code></pre>
  
  <p>But it just seems like unnecessary code if NUnit will take care of disposing when necessary.</p>