How the QPluginLoader::unload() works?
Where to find more information about this method? How it works at all? Does it only free allocated memory or does something more?
I use it to unload memory consuming plugin if it not needed. Plugin created it's own QMainWindow, and it had some QThreads inside. I close window and terminate threads before unload plugin. All works almost fine after close but suddenly application fails with SIGSEGV. I found it always fails when I try switch from application main window to QtCreator or just move mouse to window of some other app (even to Windows Toolbar). Looks like it fails when changing focus. Fail point is in mouse translation branch of QtWndProc (qapplication_win.cpp) called from user32.dll. What's wrong? I closed unloaded plugin window and it disappeared from screen. How should I operate with plugin before properly unload it?
Without plugin unload application works fine and not fails anywhere.
The simplest way to know is to look at Qt's code directly