I’m encountering some weirdness in relation to a custom LookAndFeel. When I have multiple instances of the plug-in instantiated on different tracks and open and close the editor, every now and then a plug-in editor will appear that has no look and feel applied and the plugin crashes. My feeling is that there is some form of sharing between plug-in instances of the LookAndFeel.
In the editor I do this, with myLnF a ScopedPointer.
setDefaultLookAndFeel is a static method so will apply to all your plugin instances if they’re being hosted in the same process.
Do you need to set a default look and feel? (The only reason I can think of for this is for custom fonts).
The slightly better approach is to use a SharedResourcePointer<LookAndFeel_Mine> and then don’t clear the default look and feel in the destructor.