From 7e45d931230527201ed3f235bc6f6f1315748646 Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Sat, 26 Jul 2014 16:58:27 +0200 Subject: [PATCH] HTML: fix jqplot memory leaks when replot the profile. When replot the profile, old plots must be deleted to avoid memory leaks. Signed-off-by: Gehad elrobey Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- theme/list_lib.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/theme/list_lib.js b/theme/list_lib.js index 124cd780c..135a0f9e6 100644 --- a/theme/list_lib.js +++ b/theme/list_lib.js @@ -949,6 +949,11 @@ function canvas_draw() 0 ]); } + if (plot1) + { + $('chart1').unbind(); + plot1.destroy(); + } plot1 = $.jqplot('chart1', [ depthData, pressureData,