title: Qt double free or corruption
body: <p>I developed a Qt application that has an authentication widget and  a main window. After authentication succeed I open the mainWindow using this code </p>
  
  <pre><code>this-&gt;~Authentification();
  MainWindow *w = new MainWindow(); 
  </code></pre>
  
  <p>but after I close the main window I receive a double free or corruption error. the debug said that the source of this error is</p>
  
  <pre><code>delete ui;
  </code></pre>
  
  <p>from the class <code>Authentification</code></p>