Yes, each minute drawAChart is called for each of the 3 charts. The whole page is re-drawn from a controlling routine that is called every minute by a setInterval call. There are 3 DIVs on the page, one for each chart. Every minute the same 3 DIVs are reused.
When should I be calling chart.clearChart? If I call it after the chart has been created then no chart is drawn, but the chartS object only exists inside the drawAChart routine, so that's the only place it can be used. Or am I missing something? I think I may try and use some other chart control and see if I get the same issues. On Sunday, 29 January 2017 02:58:07 UTC, Daniel LaLiberte wrote: > > I would guess you are calling drawAChart more than one time, otherwise > there is no reason the memory would grow over time. Are you keeping the > elementDIVs around after you are done with them? Or is it the same element > every time? > > If you do thrown the unused elements away, then there may still be memory > leaks involving event handling bound to those elements. You can avoid some > leaks by clearing the chart that is associated with those elements. > chart.clearChart() is what you want to call. Ideally, this shouldn't be > necessary, but some browsers may still have issues with cleaning up the > unused elements, even when they are removed. > > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/cc5e0781-3a65-4138-9485-5e7404a75c0b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
