From fe29def33f2096858f38e64b5b07700aed4e1afa Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Fri, 11 Jun 2021 18:13:22 +0200 Subject: [PATCH] Clear reconstructed VST3 events on deserialization This fixes a regression from 964c150158ec07086cb1b055df705eb36b598a95, because now the old reconstructed events buffer will stay alive. --- src/common/serialization/vst3/event-list.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/serialization/vst3/event-list.h b/src/common/serialization/vst3/event-list.h index fe9a95e9..a1c04dde 100644 --- a/src/common/serialization/vst3/event-list.h +++ b/src/common/serialization/vst3/event-list.h @@ -257,6 +257,10 @@ class YaEventList : public Steinberg::Vst::IEventList { template void serialize(S& s) { s.container(events, 1 << 16); + + // NOTE: After deserializing events, we need to make sure to clear our + // caches since those may still contain old events + reconstructed_events.clear(); } private: