Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

with my activex control, IE process not quit after close window/pages



  • I am building an activex dll with Qt. I subclass QAxFactory to create the exported class object and use singleton pattern.

    //MyFactory is subclass of QAxFactory
    //MyClass is the exported class for com container to use
    QObject *MyFactory::createObject(const QString &key)
    {
        return MyClass::getInstance();
    }
    

    Here is the problem:

    After refresh the IE page several times, then close the IE page/window, the exported class MyClass's deconstruction gets called immediately, but MyFactory's deconstruction not. And in windows task manager, the iexplorer process does not quit. After about 30~50 seconds, the iexplorer process quit and MyFactory's deconstruction gets called.

    I guess this is because my code did not clear some resources correctly, but I could not found what resource.

    Is there a way I can debug this problem? Thanks in advance!

    update
    It looks like event handler did not get released properly in js. Following is the event handler functions in js.

    function MyClassObj::eventHandler()
    {
        console.log("event fired");
    }
    

    How do I release the handler properly when page get refreshed or closed?


Log in to reply