I have few unique objects (like keyboard configuration, lookandfeel settings, etc) that I want to share between all opened VST/AU plugins. I thought doing them Singleton, but i read this from Jules:
[quote]In a plugin I don’t recommend using any kind of singleton - if you really need to share objects between your plugin instances, it’s much better to make them reference counted.[/quote] (link: http://www.rawmaterialsoftware.com/viewtopic.php?f=2&t=7491&hilit=singleton+plugin#p42302)
If I create a ReferenceCountedObject in the first VST instance…
- How can I avoid creating another one in the second one?
- How can I have a pointer in the second one that points to the object of the first one?