main: force-destroy server, events and config when unloading the plugin

This commit is contained in:
Stéphane L 2019-05-08 00:48:43 +02:00
parent b4d89d5666
commit 83bef1a840
2 changed files with 5 additions and 2 deletions

View File

@ -134,8 +134,6 @@ WSEvents::~WSEvents() {
obs_frontend_remove_event_callback(WSEvents::FrontendEventHandler, this);
os_cpu_usage_info_destroy(cpuUsageInfo);
blog(LOG_INFO, "wsevents destroyed");
}
void WSEvents::FrontendEventHandler(enum obs_frontend_event event, void* private_data) {

View File

@ -83,6 +83,11 @@ bool obs_module_load(void) {
void obs_module_unload() {
_server->stop();
_eventsSystem.reset();
_server.reset();
_config.reset();
blog(LOG_INFO, "goodbye!");
}