Same plugin loaded multiple times in one host (either VST or AU) does the same problem with the ObjC_Prefix exist. Is it safe to load the same plugin multiple times ? if it is a problem is there a way around it, maybe some guidelines on how to prepare your code to minimize the impact of this problem ?
It can only be loaded more than once if it you deliver it as both a VST and AU, and if the user actually loads it as both varieties at the same time. To avoid that, the safest thing is to create two separate bundles for AU and VST, with different obj-C prefixes. I’m sure this has been discussed in detail on other threads if you search.
well sure i get that VST and AU are differet (different projects, different OBJC prefixes), but i mean i deliver a plugin in a VST format, is it possible to load that plugin more then once in a host, this is often the case for a FX plugin or some synth plugin you want to load multiple copies of that same plugin (binary).
No - if there’s only one binary file, then it’ll only be loaded once. Multiple plugin instances are a totally different thing.
well i’m talking about one binary in multiple copies in one host, does the objc_prefix problem appear or does OSX handle this in some better way ?
eh…? Why would you have multiple copies of the same binary?
i don’t think we understand each other, the scenario is simple, i release a plugin, it’s a VST plugin, someone downloads it, copies it to his/hers VST folder on the mac, the plugin shows up.
They load it on track1 of a Live session, then load the same plugin on Track2 and Track3 and Track4 and TrackN, multiple instances of the same plugin are running in one host. Will they clash with each other because of the OBJC_Prefix problem ?
No!! To repeat myself for the third time (!), if there’s ONE binary file, it will only be loaded into memory ONCE!
i just can’t wrap my head around it, each of those tracks will have the same plugin but in different states each, i was just wondering how is that done, it’s loaded once yet each “copy” or “instance” acts as a seperate program.
It loads the DLL into memory (ONCE!), and repeatedly asks it to create new instances of the plugin. These are just a bunch of normal C++ objects, living in the heap.
allright now i understand, sorry to get you all nervous i just didn’t understand how that worked.