title: Why does QSharedPointer<T>::create call destructor of incomplete object?
body: <p>I have following code example:</p>
  
  <pre><code>#include &lt;QCoreApplication&gt;
  #include &lt;QSharedPointer&gt;
  #include &lt;QDebug&gt;
  
  #include &lt;memory&gt;
  
  class A
  {
  public:
      A()
      {
          throw 1;
      }
      ~A() { qDebug() &lt;&lt; "A destr"; }
  };
  
  int main(int argc, char* argv[])
  {
      QCoreApplication a(argc, argv);
  
      try
      {
          //auto m1 = std::make_shared&lt;A&gt;();
          auto m2 = QSharedPointer&lt;A&gt;::create();
      }
      catch (...)
      {
          qDebug() &lt;&lt; "catch!";
      }
  
      return a.exec();
  }
  </code></pre>
  
  <p>The output for the above code is:</p>
  
  <pre><code>A destr
  catch!
  </code></pre>
  
  <p>But if I uncomment the line with <code>std::make_shared</code> the output is following:</p>
  
  <pre><code>catch!
  </code></pre>
  
  <p>So why does <code>QSharedPointer::create</code> call destructor of incomplete object? Is that a bug or I'm missing something?</p>
  
  <p>I tried it with <code>MSVC2013</code> + <code>Qt 5.5.1</code> and <code>MSVC2015</code> + <code>Qt 5.6</code> (built from sources). The result is the same.</p>