To correctly handle Flex modules, you will have to declare all your
module components in a implementation of ITideModule :
public class MyModule implements ITideModule {
public function init(tide:Tide):void {
tide.addComponent("blah", Blah);
...
}
}
Then register the module with the ApplicationDomain of your Flex
module :
Spring.getInstance().addModule(MyModule, moduleApplicationDomain);
Then just before you unload the module, call :
Spring.getInstance().removeModule(MyModule);
This will clear all instances of all components of the module in all
contexts.