adobe-webplatform / eve

Custom events…
http://dmitry.baranovskiy.com/eve/
Apache License 2.0
316 stars 111 forks source link

Fix memory leak by pruning event tree in unbind #27

Closed ThomasBrierley closed 7 years ago

ThomasBrierley commented 8 years ago

The unbind method only removes target events from the tree, leaving empty nodes in it's path to accumulate. This fix collects the inner nodes and iterates over them in reverse to check for and remove empty nodes after an event is unbound.

Fixes #26 Fixes adobe-webplatform/Snap.svg#369