Removing Mediators from Modules

nick's Avatar

nick

15 Nov, 2010 04:07 AM

I've got an example up and running using .fla based modules, problem I'm running into when profiling is the mediators do not seem to be removed when the module is disposed of.

Example FirstModule.as

public function dispose():void
{

context.dispose();
context = null;

}

The Module Context -

override public function dispose():void
{

mediatorMap.unmapView( FirstModule );
super.dispose();

}

override public function startup():void
{

mediatorMap.mapView(FirstModule, FirstModuleMediator);
super.startup();

}

I'm pretty sure this is mainly due to the way the mediator is created within mapView as I'm only unmapping the view, and not disposing of the mediator. This is probably something silly in terms of how I create and assign my mediator, but I just can't seem to figure this one out.

Any help appreciated.

  1. Stray closed this discussion on 11 Feb, 2011 05:20 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac