Quitting a debug targetted JUCE application with a dialog window open created from DialogWindow::showDialog() or DialogWindow::showModalDialog() gives a fatal assert in Desktop::Desktop().
Desktop::~Desktop()
{
setScreenSaverEnabled (true);
jassert (instance == this);
instance = nullptr;
// doh! If you don't delete all your windows before exiting, you're going to
// be leaking memory!
jassert (desktopComponents.size() == 0);
}
How to avoid this bullet on app quit? Do I need to use the following to grab the dialog window’s pointer and delete it myself?
Dialogwindow* dw = contentComponent->findParentComponentOfClass<DialogWindow>()
Is that the accepted way of avoiding the assert?
I’m on JUCE 2.0.27.