title: Ownership of QString with QTextStream
body: <p>I am trying to use <code>QTextStream</code> to read from a <code>QString</code>. Since the constructor has the following signature:</p>
  
  <pre><code>    QTextStream(QString *string, QIODevice::OpenMode openMode = QIODevice::ReadWrite)
  </code></pre>
  
  <p>(see <a href="http://doc.qt.io/qt-5/qtextstream.html" rel="nofollow">the documentation</a>)</p>
  
  <p>Since the constructor is passed a raw pointer, I wonder if the <code>QTextStream</code> takes ownership of the <code>QString</code> or if I have to manage it in my code to ensure that the <code>QString</code> object is deleted after the <code>QTextStream</code> object.</p>
  
  <p>I haven't found any information on this neither in the documentation nor on search engines (e.g. google, duckduckgo). All examples I have found show a <code>QString</code> and a <code>QTextStream</code> that have the same lifetime (local variables in the same function), so I am not sure what happens if the two objects have different lifetimes.</p>