backbone-layout-manager

Memory Leak when deleting items from DOM using backbone

微笑、不失礼 提交于 2019-12-29 07:13:31
问题 I am having issues with DOM elements being left in memory after being deleted. I have set-up an example shown below. Note I am using the backbone layout manager plugin to manage my views (as well as jQuery). I have done a heap snapshot in Chrome before and after deleting one of the items in the list and compared the two: As you can see the LI element is still in memory. Backbone Layout Manager does call view.unbind() and view.stopListening() when a view is removed. Below is the example code.