angular/angular.js — pull request #1415 by vojtajina (2012-09-25 08:12:31+00:00)
Title: fix($rootScope): allow removing a listener during event

There is a bug, if an event listener is removed during the event. The next listener can be skipped, or null pointer exception can happen.

Not sure, what is the best solution for this problem.

I assume, that removing listeners does not happen so often. Otherwise we might iterate through the array and remove empty items after every event / or just sometimes :-D