title: Why is QObject destroyed signal called AFTER the destruction?
body: <p>Consider this test case:</p>
  
  <pre><code>class MyObject : public QObject
  {
      Q_OBJECT
  public:
      MyObject() { qDebug() &lt;&lt; "MyObject constructor"; }
      virtual ~MyObject() { qDebug() &lt;&lt; "MyObject destructor"; }
  };
  
  class Tracker : public QObject
  {
      Q_OBJECT
  public:
      Tracker() {}
  
  public slots:
      void onDestructor() { qDebug() &lt;&lt; "About to be destroyed!"; }
  };
  
  int main(int argc, char** argv)
  {
      QCoreApplication app(argc, argv);
  
      Tracker tracker;
  
      MyObject *obj = new MyObject();
      QObject::connect(obj, SIGNAL(destroyed()), &amp;tracker, SLOT(onDestructor()));
      delete obj;
  
      return app.exec();
  }
  </code></pre>
  
  <p>It prints this:</p>
  
  <pre><code>MyObject constructor
  MyObject destructor
  About to be destroyed!
  </code></pre>
  
  <p>This behaviour contradicts the Qt documentation: <em>"This signal is emitted immediately <strong>before</strong> the object obj is destroyed, and can not be blocked."</em> Why does this happen?</p>