2
0
Fork 0

Fixed leaking components

master
George Reales 2022-03-10 18:55:58 +01:00
parent 5adcad4a7a
commit 95b1525c3f
2 changed files with 5 additions and 6 deletions

View File

@ -521,17 +521,17 @@ void ObxdAudioProcessorEditor::loadSkin (ObxdAudioProcessor& ownerFilter)
}
if (name == "voiceSwitch"){
voiceSwitch = addList (x, y, w, h, ownerFilter, VOICE_COUNT, "VoiceCount", "voices");
voiceSwitch.reset(addList (x, y, w, h, ownerFilter, VOICE_COUNT, "VoiceCount", "voices"));
voiceSwitch->setLookAndFeel(&this->getLookAndFeel());
mappingComps["voiceSwitch"] = voiceSwitch;
mappingComps["voiceSwitch"] = voiceSwitch.get();
}
if (name == "legatoSwitch"){
legatoSwitch = addList (x, y, w, h, ownerFilter, LEGATOMODE, "Legato", "legato");
legatoSwitch.reset(addList (x, y, w, h, ownerFilter, LEGATOMODE, "Legato", "legato"));
legatoSwitch->setLookAndFeel(&this->getLookAndFeel());
mappingComps["legatoSwitch"] = legatoSwitch;
mappingComps["legatoSwitch"] = legatoSwitch.get();
}

View File

@ -272,8 +272,7 @@ private:
*midiLearnButton=nullptr,
*midiUnlearnButton=nullptr;
ButtonList *voiceSwitch = nullptr,
*legatoSwitch = nullptr;
std::unique_ptr<ButtonList> voiceSwitch, legatoSwitch;
File skinFolder;