puremvc
|
|
« Reply #1 on: April 08, 2010, 05:53:02 » |
|
Yes, you need to either remove the listeners explicitly, or specify a true for the weakRef argument to addEventListener (which is false by default).
And you don't need to do those backflips to get the facade; every proxy, mediator and command comes with a built in reference to their Facade. Further, you don't have to reference sendNotification on the facade, because every proxy, mediator and command has its own sendNotification convenience method.
Therefore, while this works:
private function handleResult(event:ResultEvent):void { ApplicationFacade.getInstance(key).sendNotification("abc", event.result); }
This is simpler and equivalent:
private function handleResult(event:ResultEvent):void { sendNotification("abc", event.result); }
-=Cliff>
|