Our SPA is built using .NET and uses knockoutJS for it's clientside bindings. We are binding all of our data on initial page load and are experiencing memory leaks on page reload. I am wondering the proper way to dispose of nested knockout oberservables to avoid memory leaks. I have tried
$(window).bind('beforeunload', function () {
ko.cleanNode(ko.vm)
});
(ko.vm being our root viewmodel) but there is still huge memory leaks. Do we need to release each subOberservable individually on page unload? Our next step is to lazy bind our data to the view..but any knockoutJS memory managing practices would be greatly appreciated.