Ownedarray of Sliders

Hi All,

I’ve noticed a strange behavior in my plugin project and even in the
demo plugin project if I create a

OwnedArray mySliders;

within the global scope of the pluginprocessor class and add a slider component
to the array inside the ctor of that class like this

mySliders.add(new Slider(String::empty));

I know it is not a good idea to do this inside the pluginprocessor but it is only for test purposes.
In my project I run a manager class that hosts an array of 256 sliders what the user can add to
a component on demand.

If I now debug the demo plugin project using juce pluginhost, it always creates a break point at the leak detector,
telling me about leaking callback messages while searching
the path for plugins and testing it.

The problem came up with one of the last git updates, it did work okay before…

Any idea?


Don’t worry too much about leaked CallbackMessages - if the plugin sends a message to the system event queue and then the host deletes the plugin before it gets delivered, then it gets leaked. Doesn’t actually do any damage though.

Okay, thanks Jules!