title: Use std::ostrstream::freeze after std::ostrstream::str to prevent memory leak
body: <p><a href="http://en.cppreference.com/w/cpp/io/ostrstream/freeze" rel="nofollow">http://en.cppreference.com/w/cpp/io/ostrstream/freeze</a></p>
  
  <blockquote>
    <p>Notes After a call to str(), dynamic streams become frozen
    automatically. A call to freeze(false) is required before exiting the
    scope in which this ostrstream object was created. otherwise the
    destructor will leak memory. Also, additional output to a frozen
    stream may be truncated once it reaches the end of the allocated
    buffer.</p>
  </blockquote>
  
  <pre><code>std::string Function( const ObjectA &amp; obj )
  {
          std::ostringstream os;
          os &lt;&lt; obj;
  
          return os.str( );
  }
  </code></pre>
  
  <p>Question> Does this function leak memory due to the missing of call of<code>std::ostrstream::freeze</code> after the <code>str()</code>?</p>