While debugging my plugin using the Audio Plugin Host, I have noticed that when you close the PluginEditor window, the object is destroyed. As well, when opening a plugin the PluginEditor object is created, then immediately destroyed, and then created again. Why the create/delete/create?
I would like to preserve the state of a plugin across open/close. I also want to be able to open multiple instances of the same plugin and have them properly remember their internal states. I have the serialization working fine, but I am not sure exactly how to “remember” which state belongs to which instance, because they are destroyed and recreated each time.
Any suggestions would be great, thanks!