Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-68880

QPluginLoader doesn't release plugin properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.9.4
    • Core: Plugins
    • None

    Description

      Im trying to develop a hot loading for my qt plugins in my application. However I cannot release the .dll file of a formerly loaded plugin.

       

      As an example I do the following:

      //creating a plugin loader

      QPluginLoader* loader = new QPluginLoader("C:\\someFolder
      SomeQtPluginDll.dll");

       

      //creating an instance

      QObject* instance = loader->instance();

      //lets assume I want do to hot loading here which means I have to release all instances of the plugin

       

       

      delete instance;

      loader->unload();

      delete loader;

       

      //now what happens is that I want to recompile my dll, but its not possible because the dll file is still locked by the application that is still running.

      I also cannot not delete the dll in the file explorer manually.

       

      Am I doing something wrong here or is this a bug in qt?

       

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            tompollok Thomas Pollok
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes