Closed SergeyRomanko closed 10 years ago
Hi!
I think there is small issue in SignalBase.removeAll() method.
This is how removeAll method looks now
public function removeAll() : void { while( head ) { var node : ListenerNode = head; head = head.next; delete nodes[ node.listener ]; listenerNodePool.dispose( node ); node.previous = null; node.next = null; } ...
And this is ListenerNodePool.dispose( node : ListenerNode ) method
internal function dispose( node : ListenerNode ):void { node.listener = null; node.once = false; node.next = null; node.previous = tail; tail = node; }
I think setting node.previous should be removed from removeAll() because it could break link between list elements inside ListenerNodePool. And it is not necessary to set node.next to null in removeAll(), it is already null.
Hi!
I think there is small issue in SignalBase.removeAll() method.
This is how removeAll method looks now
And this is ListenerNodePool.dispose( node : ListenerNode ) method
I think setting node.previous should be removed from removeAll() because it could break link between list elements inside ListenerNodePool. And it is not necessary to set node.next to null in removeAll(), it is already null.