title: free dynamically allocated memory in QT
body: <p>I have noticed in QT 5 examples there is no delete call for new widgets allocated.</p>
  
  <p>Does this mean in this example </p>
  
  <pre><code>using namespace std;
  
  #include &lt;QApplication&gt;
  #include &lt;QMainWindow&gt;
  #include &lt;QTabWidget&gt;
  
  
  //This is to be used in many files later until the code exits
  short * AA = new short[1000000];
  
  
  int main(int argc, char *argv[])
  {
      QApplication app(argc, argv);
  
      MyTabDialog w;
      w.show();
  
  
      delete[] AA;  
      return app.exec();
  
  }
  </code></pre>
  
  <p>the delete call is not needed or its place is wrong?</p>
  
  <p>Thanks</p>