Remover ouvintes de eventos de funções anônimas

Um problema com o uso de funções anônimas como manipuladores de eventos é que você não pode remover o ouvinte, o que atrapalha a coleta de lixo.
Uma maneira simples de contornar isso é usar o objeto “argumentos” do EMCAScript.

event.currentTarget.removeEventListener(event.type, arguments.callee);

Então, por exemplo:

public function showWindow():void
{
var popup:NativeWindow = new NativeWindow();
popup
.addEventListener(Event.CLOSE, function(event:Event):void {
event.currentTarget.removeEventListener(event.type, arguments.callee);
trace
("the window was closed");
}
}

http://blog.blakebarrett.net/2011/04/generic-event-listener-removal-from-any.html