Hi,
Everytime I make a code change and build, the first time the plugin runs causes Visual Studio to generate a long list of memory leak messages. This only happens the first time after a new build. After hours of hunting it turns out to be happening when adding parameters to the layout for the APVTS in the processor.
StepSequencerEngine::StepSequencerEngine() : AudioProcessor (BusesProperties().withInput("Input", AudioChannelSet::stereo(), true)),
treeState(*this, nullptr, "PARAMETERS", createParameterLayout())
{
}
AudioProcessorValueTreeState::ParameterLayout StepSequencerEngine::createParameterLayout()
{
std::vector<std::unique_ptr<RangedAudioParameter>> parameters;
for(auto i = 0; i < 16; i++)
{
auto stepEncoderParameter = std::make_unique<AudioParameterInt>(IDs::PitchEncoderIDs[i], ParameterNames::PitchEncoderNames[i], 0, 127, DefaultValues::DefaultPitch);
parameters.push_back(std::move(stepEncoderParameter));
}
return { parameters.begin(), parameters.end() };
}
^^ This is how the code looks when adding a paramter to the layout. I can’t see why this is causing an issue - can anyone shine a light on what might be problematic?
Cheers