Hello,
I am developing a single page web app and I am facing a memory leak issue when
using mapping plugin.
With every ajax update I get , the memory goes up and
never comes back. I have gone too far to use any other javascript library hence
I need your help.
To represent the problem I have created
1. Jsfiddle (http://jsfiddle.net/kapilrakh/UUnwU/8/
In this fiddle, I have tried to simulate the problem by mapping
the data again with existing model. Ideally the data would be new with every
request ( that is set to happen in 10 seconds interval) .
However everytime I use ko.mapping.fromJS, the memory goes up.
2. Local folder ( see attachment )
In this folder I have an html file and all the js files. This file should be opened with IE as its reading a local file to get the JSON (chrome won’t allow it). All you need to simulate the test is download and unzip the folder , Open html file and click on the link which triggers update cycle.
As with every update, IE memory goes up.
Here is a sieve screenshot.
Your help is greatly appreciated. I may have not written an elegant jsfiddle but I hope you understand the problem.
(The object viewModel need to be preserved as I need to let user select a few items and send a different request.)
Please let me know if there is any other approach to better manage memory. The app is supposed to run for days.
Thanks and waiting for the reply.