From a844ba9e80807262ad3b7acf03b747c71b8a294a Mon Sep 17 00:00:00 2001 From: euzuro Date: Fri, 2 Jun 2006 16:37:55 +0000 Subject: [PATCH] update the destroy() for the stock OpenLayers.Feature git-svn-id: http://svn.openlayers.org/trunk/openlayers@502 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Feature.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/OpenLayers/Feature.js b/lib/OpenLayers/Feature.js index 18c325bdcb..e8bbd10f82 100644 --- a/lib/OpenLayers/Feature.js +++ b/lib/OpenLayers/Feature.js @@ -44,7 +44,19 @@ OpenLayers.Feature.prototype= { * */ destroy: function() { + this.events = null; this.layer = null; + this.id = null; + this.lonlat = null; + this.data = null; + if (this.marker != null) { + this.marker.destroy(); + this.marker = null, + } + if (this.popup != null) { + this.popup.destroy(); + this.popup = null; + } },