Stray / robotlegs-utilities-RelaxedEventMap

Just what it says - a robotlegs eventMap that lets you be a little more relaxed about race conditions and late-arriving views
17 stars 2 forks source link

I think docs suggest onRemove vs preRemove for clean up #3

Open rickcr opened 13 years ago

rickcr commented 13 years ago

opened this as a new ticket since the other is close now.

In the docs you mention you can call the unmapListeners in preRemove. You can do this but you'll need to remember to call super.preRemove() as well since in the MediatorBase preRemove ends up calling:

    public function preRemove():void
    {
        removed = true;
        onRemove();
    }

I think it's actually safer to suggest in the docs that the user override onRemove() not preRemove and call the clean up there. onRemove is left for the user to implement so no need to even call super.remove()