From 9445defb69cf4e23ea66c7ce235a7dc8a3015d25 Mon Sep 17 00:00:00 2001 From: euzuro Date: Mon, 5 Jun 2006 16:58:09 +0000 Subject: [PATCH] destroy icon on destroy git-svn-id: http://svn.openlayers.org/trunk/openlayers@520 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Marker.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Marker.js b/lib/OpenLayers/Marker.js index c0d83c32bf..4a9fa47f3b 100644 --- a/lib/OpenLayers/Marker.js +++ b/lib/OpenLayers/Marker.js @@ -33,11 +33,10 @@ OpenLayers.Marker.prototype = { destroy: function() { this.map = null; - // code to remove HTMLImage will go here - // I realize now that it was not a good - // idea to give OpenLayers.Icon the - // 'imageDiv' property.. that should be - // here. This is on my hot-list to fix + if (this.icon != null) { + this.icon.destroy(); + this.icon = null; + } }, /**