Best practices for multiple instances of a plugin?


#1

Funny thing…I never played around with multiple instances of my plugin and wow…I’ve got some debugging to do.

First thing, I looked for any static variables and moved them to member variables, but I still have a few errors going on, both audio and graphics.

Are there any specific things I should and should not do to get multiple instances of a plugin running successfully? It seems like this is talked about, but I can’t find any hard, fast rules.

Thanks


#2

Don’t use singletons either, or if you do, be careful when they get cleaned up.


#3

Do explicit copies of Image instances when appropriate, as usually assigning an Image to another shares the same data IIRC.