hi Jonathan,

To remove modules from memory, remove all event listeners associated
with Module, Remove children, use weakReferences and after unloading
the module, assign null value to it.

check below links for your reference:

http://www.tink.ws/blog/flex-4-modules/

http://blogs.adobe.com/aharui/2009/08/what_we_know_about_unloading_m.html

Hope this resolves your module unloading problem.

-Shalu

On Jul 5, 2:10 am, Jonathan W <[email protected]> wrote:
> Hi everyone.
>
> I'm seeking some Cairngorm help. I'm using Cairngorm in an Application
> that uses a ModuleLoader. It seems I'm having trouble somewhere with
> Cairngorm model-view binding.
>
> I have Modules being loaded that are bound to a variable in the
> ModelLocator.
>
> Let's say this variable is of type BaseClass
> And Module A gets loaded and binds to it.
>
> I then unload the module and reinstantiate the variable in the model
> to a subclass of the BaseClass. I want to load another Module B that
> binds to that SubClass, but it crashes saying
>
> Type Coercion failed: cannot convert BaseClass to SubClass in Module
> A.mxml.
>
> It seems as if the old module is still there somewhere. Any ideas how
> to unload the module properly so that I can change the variable in the
> model?
>
> Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to