ImageCache and Plugins

I’m using ImageCache in my plug-in and I have a couple of questions/problems.

When loading a second instance of my plug-in, the images I cached in the first one are already there.

  1. Is this right? Is ImageCache supposed to be shared throughout all plug-in instances?

When one plug-in is closed, the other one crashes. I’m guessing this is because ImageCache is DeletedAtShutdown and my other plug-in is using some of those images.

  1. Does DeletedAtShutdown even work in plug-in code.

EDIT
I’m just starting to explore the whole plug-in side of things, so any additional Dos and Don’ts would be helpful.

Thank you

Well yes, ImageCache uses static storage, so it’s shared across anything running in the module.

DeletedAtShutdown does work in plugins, and won’t delete anything until after the last plugin is deleted… Maybe something else is causing your crash?

Tracking it down now…

I’ve been building the plug-in using the StandaloneFilterWindow and AudioFilterStreamer classes, and was under the impression that if all works with the wrapper then I’m in the clear. I guess not…

This is what I was thinking too. So the crash is happening somewhere then, but not when using StandaloneFilterWindow. Weird.