SIGN IN SIGN UP
angular / angular.js UNCLAIMED

AngularJS - HTML enhanced for web apps!

0 0 0 JavaScript

fix($rootScope): fix potential memory leak when removing scope listeners

When removing listeners they are removed from the array but the array size
is not changed until the event is fired again. If the event is never fired
but listeners are added/removed then the array will continue growing.

By changing the listener removal to `delete` the array entry instead of setting
it to `null` browsers can potentially deallocate the memory for the entry.

Fixes #16135
Closes #16161
J
Jason Bedard committed
97d0224ae60f614c8b8a07a00829e46ec4997382
Parent: e5fb929
Committed by Martin Staffa <mjstaffa@googlemail.com> on 12/13/2017, 10:45:31 AM