#904 - handlers deactivate themselves on destroy

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3901 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2007-08-14 14:53:39 +00:00
parent 238385157c
commit 7b5a4c0f3c
2 changed files with 11 additions and 2 deletions

View File

@@ -214,8 +214,10 @@ OpenLayers.Handler = OpenLayers.Class({
* Deconstruct the handler.
*/
destroy: function () {
// unregister event listeners
this.deactivate();
// eliminate circular references
this.control = this.map = null;
this.control = this.map = null;
},
CLASS_NAME: "OpenLayers.Handler"
@@ -245,3 +247,4 @@ OpenLayers.Handler.MOD_CTRL = 2;
*/
OpenLayers.Handler.MOD_ALT = 4;