From a9f369479fd5876d27eeadbc5716a8582c782175 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Wed, 17 May 2017 00:02:28 +0200 Subject: [PATCH] Dispose of vector tiles properly --- src/ol/vectortile.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ol/vectortile.js b/src/ol/vectortile.js index be1ece56c9..6a82372fc6 100644 --- a/src/ol/vectortile.js +++ b/src/ol/vectortile.js @@ -66,6 +66,18 @@ ol.VectorTile = function(tileCoord, state, src, format, tileLoadFunction) { ol.inherits(ol.VectorTile, ol.Tile); +/** + * @inheritDoc + */ +ol.VectorTile.prototype.disposeInternal = function() { + this.features_ = null; + this.replayGroups_ = {}; + this.state = ol.TileState.ABORT; + this.changed(); + ol.Tile.prototype.disposeInternal.call(this); +}; + + /** * Get the feature format assigned for reading this tile's features. * @return {ol.format.Feature} Feature format.