I’m studying the sample host code, and I see that, in gPluginWindow::closeAllCurrentlyOpenWindows(), the following code is executed after deleting the GUI windows:
I was wondering what was its use? Do some plugins require some time to clean up their GUI? Is there a risk of crashes if I do not do the same in my host?
The forum is full of threads about this, but usually talking about it from the other end…
This is important especially on OSX because once a plugin has deleted its windows, there can be OS objects that must be given a few event-loop cycles to allow them to shutdown cleanly before the DLL is unloaded from memory. And on all OSes there could be messages still in the event queue that the plugin has posted, and which will cause a crash if they get delivered after the DLL no longer exists.