Added plot.destroy() method, to properly destruct and release memory of a plot.

master
Thodoris Greasidis 13 years ago
parent 0360316eb5
commit 6f294cedf6

@ -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();

Loading…
Cancel
Save