Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
Release 7
-
None
Description
1. We are developing qt based dll which gets loaded in a host application as an add-in (both are within our company).
2. The host application supports add-ins from third party companies over which we don't have any control.
3. The host application supports loading/unloading (by user) of any add-in at any time and in any order.
4. Our problem is this:
a. When we load our add-in it calls pluginInstance which in turn creates qApp and installs windows hook.
b. When we unload our add-in it crashes because we don't have any way to unhook the windows hook which you install in pluginInstance (ours dll doesn't use MFC and so we does't have QMfcApp).
c. We have put a workaround for now by passing the handle to QtSolutions_MFCMigrationFramework-2.8.dll as argument in pluginInstance so that it gets locked in memory even if our module gets unloaded. We also don't delete qApp when our module gets loaded since some other third party app may be using it. This has two problems: qt modules remain in memory even if no one is using them, qApp leaks.
So our main question is how to support multiple independent qt-based modules in a single host process which can be loaded/unloaded anytime without disrupting the other modules and do proper cleanup.