Drop IPlugView pointer when host drops proxy

This commit is contained in:
Robbert van der Helm
2020-12-19 22:17:10 +01:00
parent b7047a5281
commit 7306809991
6 changed files with 40 additions and 6 deletions
+8
View File
@@ -67,6 +67,14 @@ void Vst3Bridge::run() {
sockets.host_vst_control.receive_messages(
std::nullopt,
overload{
[&](const Vst3PlugViewProxy::Destruct& request)
-> Vst3PlugViewProxy::Destruct::Response {
// When the pointer gets dropped by the host, we want to drop it
// here as well
object_instances[request.owner_instance_id].plug_view.reset();
return Ack{};
},
[&](const Vst3PluginProxy::Construct& request)
-> Vst3PluginProxy::Construct::Response {
Steinberg::TUID cid;