gavioto / clientsidegchart

Automatically exported from code.google.com/p/clientsidegchart
0 stars 2 forks source link

Memory leak using GChart in IE #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Use a timer that creates a GChart on each tick...

final RootLayoutPanel root = RootLayoutPanel.get();
Timer refreshTimer = new Timer() {
  public void run() {
    root.clear();
    GChart chart = new GChart();
    root.add(chart);

... builds the GChart (I have tried Example06 and Example07) 

    chart.update();
  }
};
refreshTimer.scheduleRepeating(5000);

What is the expected output? What do you see instead?
The problem is that the memory (simply seen in Windows Task Manager) increases 
on each timer tick. I have noticed it in IE8 and IE9.

What version of the product are you using? On what operating system?

GChart 2.7
IE8 on win XP
IE9 on Vista

Please provide any additional information below.
The problem does not occur on FF or Chrome.

I don't know if I am using GChart the best way. In my real world application, I 
use XHR to get data on the server on each timer tick and I build a new GChart 
each time (calling update only once). I have used the 
setOptimizeForMemory(true) but since it is the first and only update, I guess 
it has no effect at all).

what would be the best way to refresh data to avoid the memory leak?

Thanks for your great product.

Original issue reported on code.google.com by bruno.ko...@gmail.com on 12 Jan 2012 at 5:41