Memory Leak in OpenLayers + IE

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Memory Leak in OpenLayers + IE

Christopher Schmidt-2
So, after some investigation this morning, I've discovered a source of a
memory leak in Internet Explorer + OpenLayers:

Currently, when creating Tile.Image images, we bind a load/error

 OpenLayers.Event.observe(image, "load",
 OpenLayers.Event.observe(image, "error",

(Util.js, line ~180)

This is how we prevent tiles from displaying in the wrong location.
Unfortunately, this closure on the image is never cleaned up, so IE
doesn't destroy the images, even when the page is navigated away from,
resulting in a memory leak.

No fix yet, just documenting this so that if anyone has an obvious 'oh,
just do $foo', they can feel free to offer it up :)  

Christopher Schmidt
Dev mailing list
[hidden email]