code: function() {
          if (this.map) {
              this.map.events.unregister("buttonclick", this, this.onButtonClick);
          }
          this.removeButtons();
          this.buttons = null;
          this.position = null;
          OpenLayers.Control.prototype.destroy.apply(this, arguments);
      }
docs: APIMethod: destroy