Using Chrome, we were able to see a large amount of DOM nodes being created and not released when using the igDataChart.
In our scenario, we are creating about 50 charts and then removing them. We noticed that each time we create 50 charts, we have a memory leak of about 10 MB.
We tried using igDataChart("destroy"), but this did not resolve the issue.
Looking at Chrome's Canary HEAP SNAPSHOT, we were able to see an increase under jQuery.fn.init. Looking a bit closer, we noticed that the issue might be that infragistics.dv.core.js is creating a HTML button "ui-chart-opd-button" for a control we are not using. Not sure why this is being created.
Help would be appreciated.
Thank you for contacting our community.
However it seems that after destroying all charts on the page, all objects allocated between the two actions (creating and destroying) have been released without memory leaks.
For your reference I'm attaching you the sample that I've used to experiment with. Please test it on your side and let me know if you're able to reproduce the issue on it.
Otherwise if this sample is not an accurate demonstration of what you're trying to do, please send me an isolated sample that demonstrates this behavior and I can test on my side.
If you need further assistance, do not hesitate to contact me.
Thank you for your reply and example. This is an example that is close to what I have, but not exactly the same. I have modified your example to create 2 buttons. One for creating 50 charts, the other one for destroying them. The reason is that our application is a SPA (Single page application). Therefore, there is never really a page refresh between the creation and deletion of the charts.
So, to reproduce the problem, simply press the create button and then the destroy button. Do this about 10 times.
I have seen to issues doing this:
1) An increase in html nodes. (Which I suspect are detached)
2) Eventually, after creating and destroying charts about 10 times, the chart becomes black. I suspect that the Chrome Canvas implementation crashes for some reason. This might be unrelated to the increase in Html nodes.
I added 2 screenshots showing the increase in nodes and the heap snapshot.
Let me know if you can reproduce the issue.
Thanks for your help,
After contacting our developers for this behavior, it was determined that there is an existing development issue related to it with a Development ID of 168797.
I've opened a private case for you with number CAS-134248-D2L0Q6 and have linked the development issue to it so that you'll be notified once the issue has been resolved.
You can find the case by going to your account on our web site and then to the "Support Activity" tab.
You can view the status of the development issue connected to that case by selecting the "Development Issues" tab when viewing this case.
Please let me know if you need more information.