JUCE icon indicating copy to clipboard operation
JUCE copied to clipboard

Plug memory leak calling setStateInformation() on hosted VST3

Open getdunne opened this issue 6 years ago • 2 comments

See my JUCE Forum post https://forum.juce.com/t/memory-leak-calling-setstateinformation-on-hosted-vst3-plugin/31660, and test/demo project https://github.com/getdunne/juce-wrapper. I think the leak is caused by the ComSmartPtr<Steinberg::MemoryStream> object getting initialized with a reference count of 2 here, when it should be just 1.

getdunne avatar Feb 08 '19 14:02 getdunne

For the second commit, what platform were you using when you spotted duplicates?

tpoole avatar Mar 25 '19 16:03 tpoole

For the second commit, what platform were you using when you spotted duplicates?

My mistake--that second commit wasn't meant to be part of the original memory leak fix. It's a separate issue. I committed the change to my own fork because I use GitHub to propagate among different development PCs and Macs. It didn't occur to me that it would come up for you as part of the open PR--sorry about that.

I don't consider this change definitive in any way, but the duplicates do occur, so probably ought to be investigated.

To answer your question, I saw this on Windows 10 64-bit, when I opened a standard Audio Device Setup dialog and ticked, then un-ticked the box for input channels 1&2. For some reason the block size 128 was enumerated twice.

getdunne avatar Mar 25 '19 17:03 getdunne