Home Forums Report Bugs Memory leak

Memory leak

Viewing 2 posts - 1 through 2 (of 2 total)
  • #10352

    Hi,

    We have been noticing some of our apps using an excessive amount of memory. This seems to occur when we use live ticking charts. We also noticed in some instances when we have tooltips, if we keep moving the most over points memory in chrome would also go up drastically.

    I cannot post to JSFiddle from this pc so please see the below,

    <!DOCTYPE HTML>
    <html>
    <head>
    	<script type="text/javascript">
    	window.onload = function () {
    		tick = true;
    		var dps = [{x: 1, y: 10}, {x: 2, y: 13}, {x: 3, y: 18}, {x: 4, y: 20}, {x: 5, y: 17},{x: 6, y: 10}, {x: 7, y: 13}, {x: 8, y: 18}, {x: 9, y: 20}, {x: 10, y: 17}]; 
    
    		var chart = new CanvasJS.Chart("chartContainer", {
    			data: [{
    				type: "line",
    				dataPoints : dps
    			}]
    		});
    
    		chart.render();
    		updateInterval = 1000;
    
    		var updateChart = function () {
    			if (!tick) return;
    			// leak occurs whether or not data changes
    			//dps[dps.length - 1].y = Math.round(5 + Math.random() *(-5-5));
    			chart.render();		
    		}
    
    		setInterval(function(){ updateChart() }, updateInterval); 
    }
    </script>
    <script type="text/javascript" src="/js/canvasjs-commercial-1.8.0/canvasjs.min.js"></script>
    </head>
    <body>
    	<div id="chartContainer" style="height: 300px; width: 100%;">
    	</div>
    </body>
    </html>
    
    • This topic was modified 7 years, 11 months ago by gtsafas.
    #10361

    Hello,

    We checked with the code you have provided and we are unable to find any memory leakage. It would help us to check into the issue if you can provide the following details.
    1. OS and version
    2. Browser and version

    Kindly create a fiddle.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.