Commit 7fa063e9 authored by David Schnur's avatar David Schnur

Merge pull request #1130 from thgreasi/master

Added plot.destroy() method, to properly destruct and release memory of plots.
parents 319f4dfe 6f294ced
......@@ -658,6 +658,23 @@ Licensed under the MIT license.
};
};
plot.shutdown = shutdown;
plot.destroy = function () {
shutdown();
placeholder.removeData("plot").empty();
series = [];
options = null;
surface = null;
overlay = null;
eventHolder = null;
ctx = null;
octx = null;
xaxes = [];
yaxes = [];
hooks = null;
highlights = [];
plot = null;
};
plot.resize = function () {
var width = placeholder.width(),
height = placeholder.height();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment