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>
This commit is contained in:
Gehad elrobey 2014-07-26 16:58:27 +02:00 committed by Dirk Hohndel
parent a562dd0e12
commit 7e45d93123

View file

@ -949,6 +949,11 @@ function canvas_draw()
0
]);
}
if (plot1)
{
$('chart1').unbind();
plot1.destroy();
}
plot1 = $.jqplot('chart1', [
depthData,
pressureData,