[Interest] QPluginLoader

Igor Mironchik igor.mironchik at gmail.com
Wed Apr 19 08:30:38 CEST 2017


Hello,

In the docs to QPluginLoader:

Once loaded, plugins remain in memory until all instances of 
QPluginLoader <qpluginloader.html> has been unloaded, or until the 
application terminates.

But in plugandpaint example:

//![6]

foreach(QStringfileName,pluginsDir.entryList(QDir::Files)){

QPluginLoaderloader(pluginsDir.absoluteFilePath(fileName));

QObject*plugin=loader.instance();

if(plugin){

populateMenus(plugin);

pluginFileNames+=fileName;

//![6]//![7]

}

//![7]//![8]

}

So my question is why plugins keep alive when QPluginLoaders' will be destructed?

Or in Qt somewhere is static global QPluginLoader that keeps all plugins alive? Or something yet?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170419/656fe554/attachment.html>


More information about the Interest mailing list