[Interest] QPluginLoader
Konstantin Tokarev
annulen at yandex.ru
Wed Apr 19 10:15:13 CEST 2017
19.04.2017, 09:30, "Igor Mironchik" <igor.mironchik at gmail.com>:
> Hello,
>
> In the docs to QPluginLoader:
>
> Once loaded, plugins remain in memory until all instances of QPluginLoader has been unloaded, or until the application terminates.
>
> But in plugandpaint example:
>
> //! [6]
>
> foreach (QString fileName, pluginsDir.entryList(QDir::Files)) {
>
> QPluginLoader loader(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?
It's broken after https://codereview.qt-project.org/#/c/140750/
> ,
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
--
Regards,
Konstantin
More information about the Interest
mailing list