When you write out a section of the DOM using Knockout's foreach binding, and you have events in there (say, using the click binding for example), does Knockout automatically perform cleanup on those if the list in the view model changes and it has to rewrite that section? I've seen a lot written about Backbone.js and cleaning up events, etc., but not much on Knockout about this.
Asked
Active
Viewed 109 times
1 Answers
0
Yes, knockout takes care of cleanup for all default bindings.
In case you want to perform cleanup on a custom binding, take a look at the following documentation:
http://knockoutjs.com/documentation/custom-bindings-disposal.html

Bragolgirith
- 2,167
- 2
- 24
- 44