javascript - What to do with jqPlot memory leak? - Stack Overflow

I have heard from too many people that JavaScript libruaries like jqPlot or Flot that are designed to d

I have heard from too many people that JavaScript libruaries like jqPlot or Flot that are designed to draw graphs have memory leaks if updated live for a long period of time. I know that most use the replot() function to update the graph in real time but that's where the problem seems to happen.

Has anybody figured out a work around this? Maybe refreshing the entire graph and the jquery code in a DIV?

I have heard from too many people that JavaScript libruaries like jqPlot or Flot that are designed to draw graphs have memory leaks if updated live for a long period of time. I know that most use the replot() function to update the graph in real time but that's where the problem seems to happen.

Has anybody figured out a work around this? Maybe refreshing the entire graph and the jquery code in a DIV?

Share Improve this question asked Jun 17, 2011 at 0:05 kidalexkidalex 1,5272 gold badges12 silver badges14 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

you should use the “destroy” method (plot.destroy()) on your plot before you empty the container and draw the plot again. It worked for me!

No, i tried it with emptying the div and redraw the plete diagram with jqPlot. That doesn't help either. I did it like this:

$('#diagramContainer').empty();
targetPlot = $.jqplot('#diagramContainer',
    toDraw, diagramOptions);

Doing this lots of times with many data leads also to memory leaks.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745435094a4627571.html

相关推荐

  • javascript - What to do with jqPlot memory leak? - Stack Overflow

    I have heard from too many people that JavaScript libruaries like jqPlot or Flot that are designed to d

    5小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信