AUv3 AudioProcessor destructor no longer called (starting from JUCE 6.0.8)

I updated JUCE already a while ago to 6.1.x and didn’t notice, that the AUv3 lifecycle seems to have significantly changed with JUCE 6.0.8.
My AudioProcessor destructor is no longer called if an instance of my AUv3 is thrown away (even the last one). I just get a call to releaseResources (), but this is also called if just the buffer size changes, so it’s not a good place to release hundreds of MB of sample data.
This erroneous behaviour (at least for our instrument) was introduced with commit 2a199d522 (JUCE_AUv3_Wrapper.mm).

Has anyone else noticed this, too?

@reuk Could you have a look, or do you have hints?
There is no entry in the JUCE breaking changes document regarding this topic.

Update: I can reproduce this behaviour with the AUv3SynthPlugin example (from Projucer). This should be fixed asap, because it results in massive problems for the user (e.g. opening an instrument in Garageband, then saving the song, then opening the song again can produce a crash on some machines, because RAM is stacking up).

Thanks, this looks like a JUCE bug. I think that an autorelease went missing in the commit that you mentioned. I’ll add that back in shortly.

That would be great, thank you :grinning: I can test it right away.
Odd that this hasn’t been noticed yet…

Do you have any news about the fix? We have to decide today, if we roll back to JUCE 6.0.7 or not, because we are planning a release, soon. Of course we’d rather like to use the latest version of JUCE.

I’ve just pushed the fix to develop:

Thank you. That seems to work.