Solved Qt double free or corruption
-
I developed a QT application that has an authentication widget and a main window. After authentication succeed I open the mainWindow using this code
this->~Authentification(); MainWindow *w= new MainWindow();
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
delete ui;
from the class Authentification
-
-
thanks @kshegunov
yes the problem disappear but I need to close the authentification window and open the mainwondow.
what's the best way to do that. -
@madababi
Hi cant you just call close();
on the Authentification ? -
@mrjj
Thanks it works very well.