I think you misunderstand me. What I mean is to set the mainwindow of your
singleton to NULL in the destructor of the *MainWindow*. This prevents a
stale pointer in your singleton after MainWindow is freed but the singleton
still lives.