Commit small change to destroy events objects when destroying objects with

events. This removes a number of minor memory leaks with creating/destroying
popups, layers, features, and markers.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2894 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-03-26 00:50:31 +00:00
parent eb13974c5e
commit 8e3856b4ac
5 changed files with 15 additions and 3 deletions
+2 -1
View File
@@ -212,7 +212,8 @@
t.eq(OpenLayers.Event.observers.length,
start + OpenLayers.Events.prototype.BROWSER_EVENTS.length + 1,
"construction increases the number of event observers");
events = events.destroy();
events.destroy();
events = null;
t.eq(OpenLayers.Event.observers.length, start,
"destruction restores the number of event observers");
}