Better cleanup.

This commit is contained in:
ahocevar
2012-06-20 15:52:24 +02:00
parent 80f76a91e1
commit 8c4b528ded

View File

@@ -297,6 +297,7 @@ ol.event.Events.prototype.handleBrowserEvent = function(evt) {
* Destroy this Events instance.
*/
ol.event.Events.prototype.destroy = function() {
this.setElement();
for (var p in this) {
delete this[p];
}