our web apps stay open for long times (days to month). This is why memory leaks are allways critical.
I'm testing the angular gauge with annotations. Not only the value of the gauge changes, also the annotations may change on every update. Therefor the setData method is not enough - i have to redraw the full gauge (on new data).
The data is requested periodically per ajax. So what's the correct way to redraw the gauge without memory leaks?
After every request this code will be executed: (create gauge only once and setJSONData if available | App is my global application object)
var instrument = App.instrument;
if(instrument === null)
instrument = new FusionCharts("AngularGauge", "instrumentId", "100%", "100%", "0");
App.instrument = instrument;
instrument.render("div_instrument"); //id of rendering div
//JSON data from ajax request
var gaugeData = jsonData.result.gaugeData
The used memory raises on every setJSONData. Taking Heap Snapshots (Google Chrome -> [F12] -> Profiles -> Take Heap Snapshot -> Dominators) there is one object that grows rapidly (see attached png ).
Is there a way to reset / clear the gauge? I'm using the latest version of the widgets (@version fusioncharts/3.3.1-sr2.19840)