wise9/enchant.js — pull request #303 by illfang (2014-12-05 04:50:25+00:00)
Title: Collection memory leak fix and Node.remove behavior fix

* Ensure that an Entity clears up its collection entries when the clearEventListener function is called as the removeFromCollection listeners will be cleared

* The remove function of the Node should first remove the child from its parent node to trigger cleanup events (e.g. removedfromscene) and then it is safe to clear the event listener

* added test case for collection behavior when using remove or parentNode.removeChild