void DefaultManager::unload() { for (auto loader : plugins) { Plugin* plugin = qobject_cast<Plugin*>(loader->instance()); plugin->terminate(); unregister_renderers(plugin); plugin->cleanup(); loader->unload(); loader.reset(); } }
static void plugin2_unload (LoadedModule * loaded) { Plugin * header = loaded->header; switch (header->type) { case PLUGIN_TYPE_TRANSPORT: case PLUGIN_TYPE_PLAYLIST: case PLUGIN_TYPE_INPUT: case PLUGIN_TYPE_EFFECT: if (PLUGIN_HAS_FUNC (header, cleanup)) header->cleanup (); break; } pthread_mutex_lock (& mutex); g_module_close (loaded->module); g_slice_free (LoadedModule, loaded); pthread_mutex_unlock (& mutex); }