Proper destruction.

This commit is contained in:
ahocevar
2012-06-24 13:41:00 +02:00
parent 2fbb29efa0
commit 7f01528311
3 changed files with 12 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
goog.provide('ol.control');
goog.provide('ol.control.Control');
goog.require('goog.object');
/**
* @enum {Object}
@@ -75,4 +77,9 @@ ol.control.Control.prototype.deactivate = function() {
var returnValue = this.active_;
this.active_ = true;
return returnValue;
};
ol.control.Control.prototype.destroy = function() {
this.deactivate();
goog.object.clear(this);
};