Christian Adler

Members
  • Content count

    2
  • Joined

  • Last visited

Everything posted by Christian Adler

  1. Memory Leak On Redrawing Gauge

    Hello, 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"); instrument.setTransparent(true); App.instrument = instrument; instrument.render("div_instrument"); //id of rendering div } //JSON data from ajax request var gaugeData = jsonData.result.gaugeData // redraw? if(gaugeData) { instrument.setJSONData(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) Regards, Christian Adler
  2. Memory Leak On Redrawing Gauge

    Until now unfortunately i got no solution I also asked the support team too - but no solution yet. My first attempt was the dispose() method and creating a new gauge every time. 'dispose' was suggested by the support team too. But there is no change in the memory using behaviour.