MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / UnloadPlugin

Method UnloadPlugin

src/openrct2/scripting/ScriptEngine.cpp:958–967  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

956}
957
958void ScriptEngine::UnloadPlugin(std::shared_ptr<Plugin>& plugin)
959{
960 if (plugin->IsLoaded())
961 {
962 plugin->Unload();
963 LogPluginInfo(plugin, "Unloaded");
964 // A GC run is required to clean up all JS objects before the game global context is cleaned up on shut down.
965 JS_RunGC(_runtime);
966 }
967}
968
969void ScriptEngine::StartPlugin(std::shared_ptr<Plugin> plugin)
970{

Callers

nothing calls this directly

Calls 2

IsLoadedMethod · 0.80
UnloadMethod · 0.45

Tested by

no test coverage detected