Since we have a destroyFeatures command, use it. Patch from fredj, closes

#703.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@3151 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-05-15 21:14:26 +00:00
parent 74c08dd582
commit 7871d26df4

View File

@@ -97,8 +97,7 @@ OpenLayers.Layer.Vector.prototype =
destroy: function() {
OpenLayers.Layer.prototype.destroy.apply(this, arguments);
// HACK HACK -- I believe we should be iterating and
// calling feature[i].destroy() here.
this.destroyFeatures();
this.features = null;
this.selectedFeatures = null;
if (this.renderer) {