2
0
Fork 0

Fixed leaking components

This commit is contained in:
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"){ 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()); voiceSwitch->setLookAndFeel(&this->getLookAndFeel());
mappingComps["voiceSwitch"] = voiceSwitch; mappingComps["voiceSwitch"] = voiceSwitch.get();
} }
if (name == "legatoSwitch"){ 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()); legatoSwitch->setLookAndFeel(&this->getLookAndFeel());
mappingComps["legatoSwitch"] = legatoSwitch; mappingComps["legatoSwitch"] = legatoSwitch.get();
} }

View file

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