MCPcopy Create free account
hub / github.com/Vhonowslend/StreamFX-Public / obs_module_unload

Function obs_module_unload

source/plugin.cpp:98–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96MODULE_EXPORT void obs_module_post_load(void) {}
97
98MODULE_EXPORT void obs_module_unload(void)
99{
100 try {
101 DLOG_INFO("Unloading Version %s", STREAMFX_VERSION_STRING);
102
103 // Run all finalizers.
104 for (auto kv : streamfx::get_finalizers()) {
105 for (auto init : kv.second) {
106 try {
107 init();
108 } catch (const std::exception& ex) {
109 DLOG_ERROR("Finalizer threw exception: %s", ex.what());
110 } catch (...) {
111 DLOG_ERROR("Finalizer threw unknown exception.");
112 }
113 }
114 }
115
116 // Finalize GLAD (OpenGL)
117 {
118 streamfx::obs::gs::context gctx{};
119 _streamfx_gfx_opengl.reset();
120 }
121
122 DLOG_INFO("Unloaded Version %s", STREAMFX_VERSION_STRING);
123 } catch (std::exception const& ex) {
124 DLOG_ERROR("Unexpected exception in function '%s': %s", __FUNCTION_NAME__, ex.what());
125 } catch (...) {
126 DLOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
127 }
128}
129
130std::shared_ptr<streamfx::util::threadpool::threadpool> streamfx::threadpool()
131{

Callers

nothing calls this directly

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected