I just put together a simple GUI for my plugin with the Introjucer Component Editor. I added a bunch of sliders, which the Introjucer adds to the class as
ScopedPointer<Slider> members. I’ve also added a
ScopedPointer<AudioProcessorValueTreeState::SliderAttachment> manually for each slider, linking the slider to a particular value in my processor’s ValueTreeState.
When my editor destructor is called, I get a reference error when JUCE’s ContainerPolicy tries to delete something that has already been deleted. This only happens in Windows, actually, and I can’t figure out why.
The problem goes away when I list my slider members directly as
Slider types rather than as
ScopedPointer<Slider> types, but I can’t find a way to make the GUI editor add my sliders in this way.
Is there some obvious solution that I’m missing? Or will I have to just stop using the GUI editor?