From 16a0ecf41a1f25dbad574c718f1a92753de31615 Mon Sep 17 00:00:00 2001 From: euzuro Date: Thu, 10 Aug 2006 06:36:14 +0000 Subject: [PATCH] rewrite but this time not killing array structure by setting to a new var git-svn-id: http://svn.openlayers.org/trunk/openlayers@1189 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Tile/WFS.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Tile/WFS.js b/lib/OpenLayers/Tile/WFS.js index 222d30be78..0754e41ae9 100644 --- a/lib/OpenLayers/Tile/WFS.js +++ b/lib/OpenLayers/Tile/WFS.js @@ -48,8 +48,9 @@ OpenLayers.Tile.WFS.prototype = * be reused in a new location. */ clear: function() { - for(var i=0; i < this.features.length; i++) { - this.features[i].destroy(); + while(this.features.length > 0) { + var feature = this.features.shift(); + feature.destroy(); } },