Hi again,

I'm not sure if the following is specific to the Qt 4.5 snapshot, but
at least that's where I'm getting the following "interesting" problem
:)

If have loaded a plugin using QPluginLoader and retrieved its root
object using QPluginLoader::instance(). Now I want to unload the
plugin, and this is where it goes wrong.

The docs say the following about unloading plugins:
"Warning: The root component of a plugin, returned by the instance()
function, becomes invalid once the plugin is unloaded. Delete the root
component before unloading the plugin."

So, what I do is delete the root object, and then I call
QPluginLoader::unload(). However, at this point my root object gets
re-instantiated. Apparently, this is because QPluginLoader::unload()
calls QLibraryPrivate::unload() which calls qt_plugin_instance() (at
corelib/plugin/qlibrary.cpp:451).

So, my question is, why does QPluginLoader::unload() create a new
instance of the root object which I am actually supposed to delete
before unloading?

Greetings,
Arend.

-- 
Arend van Beelen jr.
"If you want my address, it's number one at the end of the bar."
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to