MCPcopy Create free account
hub / github.com/MyGUI/mygui / unloadPlugin

Method unloadPlugin

MyGUIEngine/src/MyGUI_PluginManager.cpp:81–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 void PluginManager::unloadPlugin(std::string_view _file)
82 {
83 MYGUI_ASSERT(mIsInitialise, getClassTypeName() << " used but not initialised");
84
85 DynLibList::iterator it = mLibs.find(_file);
86 if (it != mLibs.end())
87 {
88 // Call plugin shutdown
89 DLL_STOP_PLUGIN pFunc = reinterpret_cast<DLL_STOP_PLUGIN>((*it).second->getSymbol("dllStopPlugin"));
90
91 MYGUI_ASSERT(
92 nullptr != pFunc,
93 getClassTypeName() << "Cannot find symbol 'dllStopPlugin' in library " << _file);
94
95 // this must call uninstallPlugin
96 pFunc();
97 // Unload library (destroyed by DynLibManager)
98 DynLibManager::getInstance().unload((*it).second);
99 mLibs.erase(it);
100 }
101 }
102
103 void PluginManager::_load(xml::ElementPtr _node, std::string_view /*_file*/, Version _version)
104 {

Callers 2

destroySceneMethod · 0.80
destroySceneMethod · 0.80

Calls 6

getClassTypeNameFunction · 0.85
getSymbolMethod · 0.80
findMethod · 0.45
endMethod · 0.45
unloadMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected