I've integrated highcharts into my AngularJS application using the highcharts-ng
directive, but I'm encountering a persistent memory leak issue. My app is a slideshow with rotating slides that include charts.
To investigate further, I created 3 different test scenarios:
1 - A simple JavaScript application that rebuilds a chart every second without causing a memory leak: http://jsfiddle.net/78af7zcm/
2 - An AngularJS application that manages an array of charts, swapping them out every second to simulate a slideshow. No memory leaks were detected in this scenario: http://plnkr.co/edit/7Zkheiz82ajVusB2EtqH?p=preview
3 - Another AngularJS app similar to the previous one, but actively modifying a single chart based on an event listener. This is where the memory leak occurs, as seen after running for 1 hour and taking snapshots: http://plnkr.co/edit/7cvDrMlWlgLOBAwoNgkW?p=preview. Here's what was observed during the execution:
https://i.sstatic.net/4RPUa.png
If anyone has insights into why this might be happening, please let me know.