Home › forums › Using CanvasJS › memory leak
I have a built a tool where the charts are constantly changing depending on several inputs.
Currently I’m creating a new chart each time, but this results in memory leaks
What I’m doing wrong?
You are creating a totally new chart each time you want to update which is causing memory leak. Instead create the chart once and only update the data inside “updateChartN” method. Please check this example.
Ok, I will try that.
What is consuming memory, the chart objects or something about the canvas?
Tried a different approach, works great :)
chart = charts[key];
You must be logged in to reply to this topic.