aboutsummaryrefslogtreecommitdiffstats
path: root/theme/list_lib.js
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2014-07-26 16:58:27 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-04 10:03:04 -0700
commit7e45d931230527201ed3f235bc6f6f1315748646 (patch)
tree5c816307eb5b8c9a3e50e5d2f618a990b9f1e53b /theme/list_lib.js
parenta562dd0e12f59096974d39a3478ef13eca72006b (diff)
downloadsubsurface-7e45d931230527201ed3f235bc6f6f1315748646.tar.gz
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 <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'theme/list_lib.js')
-rw-r--r--theme/list_lib.js5
1 files changed, 5 insertions, 0 deletions
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,