code: function() {
          if(this.active && this.layers) {
              this.map.removeLayer(this.layer);
          }
          OpenLayers.Control.prototype.destroy.apply(this, arguments);
          if(this.layers) {
              this.layer.destroy();
          }
      }
docs: Method: destroy