CallAsync memory issue

We’ve got an issue here with one of our plugins.

When debugging in Reaper (this is our main testing DAW) on PC, we get Memory leaked object asserts for AsyncCallInvoker, when the plugin starts up and shuts down twice before Reaper starts properly.

Using the Heavyweight leak detector I can see that it comes from using MessageManager::CallAsync. It’s like a few messages are sent during the time that the plugin is active in these small instances, but they don’t get deleted. Are we missing a call to flush these messages? or are we missing something else?

Dave