Application Exit issue
-
I'm integrating QtWebEngine in my application but I'm having an issue related with application exit.
I've noticed that problem during some application tests, where I have to close the application after loading the web page.
During those tests, If I load a regular web page (ie: http://www.google.com) and quit the application immediately after that, the application takes the same time as it was taking before the integration (+- 5 seconds) but, if I load a local javascript library and quit the application immediately after that, the application takes much more time (80 sec) for exiting.My code is exactly the same for both kinds of QWebEngineView loads, but I noticed that the application loads more dlls when it loads the javascript library (crypt related, fwpucInt, gpapi, wldal32) and, in both type of loads, when I close the web view QtWebEngineProcess.exe process is immediatly ended.
After some investigation I found that, after loading the js library, if wait some time before exiting the application, the application takes less time to exit. So ... I concluded that after loading the library I have to "wait" (75sec) to exit:
- If I try to quit the application after loading the library - the application takes 75 sec + 5 seconds (the time exit was taking before the integration) to exit
- If I try to quit the application N seconds (N < 75) after loading the js library - the application takes (75 seconds - N seconds) + 5 seconds (the time exit was taking before the integration) to exit
- If I try to quit the application N seconds (N >= 75) after loading the js library - 5 seconds (the time exit was taking before the integration) to exit
How can I reduce that time?
What's causing that time difference? Is it related with qAddPostRoutine(deleteShareContext); ?