shutdownJuce_GUI() and VST3

#1

VST3 doesn’t use shutdownJuce_GUI().
While minor,
both on develop and master this could cause leaks. I can have ‘Leak Objects Detected’ assertions with Ableton Live 10.1b20 and Adobe Premiere Pro.

It seems shutdownJUCE_GUI should be added also for VST3.

#2

The VST3 wrapper uses ScopedJuceInitialiser_GUI instead in a few places so it should be initialising and shutting down the MessageManager correctly, but I’ll take a look and see if it’s functioning correctly.

1 Like
#3

The issue here is that some hosts, like the ones that you’ve mentioned + the Steinberg editorhost example, don’t call release() on the IPluginFactory object when the plug-in is unloaded. This means that its reference count never reaches 0 so it isn’t deleted and JUCE’s leak detector fires a bunch. I’ve moved around the ScopedJuceInitialiser_GUI objects and removed a few so we minimise the amount of leaked objects but we can’t do anything about the leaked IPluginFactory. I’ve removed the JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR macro from this object though so it won’t clog up the debug output in misbehaving hosts. The commit is on the develop branch here.

I’ve also contacted the Ableton devs so hopefully this will be fixed in Live 10 soon.

4 Likes
#4

Thanks, I’ve also fiddled with it putting debug messages seeing the counter never decrease to 0.
btw, Ableton is already aware (I’ve notified them).

2 Likes