title: Which objects does the garbage collector not clean up?
body: <p>A static analysis tool keeps telling me that my C# code has resource leaks in it.</p>
  
  <p>Here's an example:</p>
  
  <pre><code>StringReader reader = new StringReader(...); 
  
  // do something with reader
  
  ...
  
  } // static analysis tool cries that I've leaked **reader**
  </code></pre>
  
  <p>Is my tool correct? If so, why?</p>
  
  <p><strong>Edit</strong> (replying to comment) - My static analysis tool says that I've got a bunch of resource leaks. I know from this <a href="https://stackoverflow.com/questions/1407161/why-should-you-have-to-dispose-a-java-awt-window-that-goes-out-of-scope">forum</a> that certain Java AWT objects need to be explicitly freed, otherwise a leak occurs. Are there C# objects that need to be explicitly freed?</p>