I’m not sure if there is a bug in the library? I made a custom LookAndFeel_V4 class and set it to MainComponent, which has an AudioDeviceSelectorComponent. The program exits without error if I just run and exit right away. but if I opened up the comboboxes in the AudioDeviceSelectorComponent before I exit, the lookandfeel destructor gives an assertion error because there is more than one active weak references:
Well then I guess this is telling you that your combo box is still open and using this L+F at the time you’re deleting it. You need to make sure the combo boxes are all cleaned up and not leaking.
I have the same problem (see LookAndFeel assert firing with ComboBoxPopup open).
The deconstructor of my ComboBoxe is called before the assertion fires, so they should be taken care of. However, the hidePopup() method within the deconstructor does not do the trick and the LaF is still referenced.
thanks jules and danielrudrich, i got it fixed. the problem was that the lookandfeel was destructed before the audiodeviceselectorcomponent. so i moved my lookandfeel to the first of the private fields and then the errors were gone (destructors start from the bottom to the top).