By setting the innerHTML of the icon, we tell browsers they can clean up the

memory associated with those images. This completes #581, and reduces the 
memory used by applications where adding and removing of many markers 
is used.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2925 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-03-29 16:25:52 +00:00
parent dcd550ff31
commit 6c67b3a0e3

View File

@@ -52,6 +52,8 @@ OpenLayers.Icon.prototype = {
},
destroy: function() {
OpenLayers.Event.stopObserving(this.imageDiv.firstChild);
this.imageDiv.innerHTML = "";
this.imageDiv = null;
},