title: Is a memory leak created if a MemoryStream in .NET is not closed?
body: <p>I have the following code:</p>
  
  <pre><code>MemoryStream foo(){
      MemoryStream ms = new MemoryStream();
      // write stuff to ms
      return ms;
  }
  
  void bar(){
      MemoryStream ms2 = foo();
      // do stuff with ms2
      return;
  }
  </code></pre>
  
  <p>Is there any chance that the MemoryStream that I've allocated will somehow fail to be disposed of later?  </p>
  
  <p>I've got a peer review insisting that I manually close this, and I can't find the information to tell if he has a valid point or not.</p>