title: QString::toStdString() crashes on std::string destructor
body: <p>I've been debugging this for 2 hours now, and it boils down to this. If I call <code>QString::toStdString</code></p>
  
  <pre><code>QString s = "testtesttesttesttesttest";
  const std::string &amp;temp = s.toStdString();
  </code></pre>
  
  <p>the program later crashes on std::string destructor</p>
  
  <pre><code>__CLR_OR_THIS_CALL ~basic_string()
      {   // destroy the string
      _Tidy(true); // &lt;---- It crashes on this line.
      }
  </code></pre>
  
  <p>I thought it was memory corruption at first, but this happens even if <code>main()</code> contains only those 2 lines. Does anyone know why this happens, and also how can I fix it?</p>
  
  <p>My Qt version is <code>4.8.1</code>.</p>