Implement YaComponentPluginImpl destructor

When the object gets dropped through the reference counting system, the
object should also be dropped in the Wine plugin host.
This commit is contained in:
Robbert van der Helm
2020-12-11 22:59:32 +01:00
parent cdb9dae2df
commit 699ddfd2ea
7 changed files with 51 additions and 6 deletions
+7
View File
@@ -70,6 +70,13 @@ void Vst3Bridge::run() {
return std::nullopt;
}
},
[&](const YaComponent::Destroy& request)
-> YaComponent::Destroy::Response {
std::lock_guard lock(component_instances_mutex);
component_instances.erase(request.instance_id);
return Ack{};
},
[&](const WantsPluginFactory&) -> WantsPluginFactory::Response {
return *plugin_factory;
}});