title: When is a returned MemoryStream released in WCF?
body: <p>In the following scenario I want to return just a string because that's what the spec says but to do that I have to return a stream and I just want to make sure than I don't keep too many streams around for too long. The method looks like:</p>
  
  <pre><code>[WebGet(BodyStyle = WebMessageBodyStyle.Bare,
      RequestFormat = WebMessageFormat.Xml,
      ResponseFormat = WebMessageFormat.Xml,
      UriTemplate = "someuri/{parameter}")]
  [OperationContract]
  public Stream FooBar(string parameter)
  {
      byte[] bytes = Encoding.UTF8.GetBytes("some string");
      return new MemoryStream(bytes);
  }
  </code></pre>
  
  <p>Does anyone know when this resource is released?</p>