Simulator destruction added to the MainWindow destructor