plugin->instance()->setParent(loader)
loader.unload();
QPluginLoader::~QPluginLoader ()Destroys the QPluginLoader object.Unless unload() was called explicitly, the plugin stays in memory until the application terminates.