code: function() {
  
          this.id = null;
          this.lonlat = null;
          this.size = null;
          this.contentHTML = null;
          
          this.backgroundColor = null;
          this.opacity = null;
          this.border = null;
          
          if (this.closeOnMove && this.map) {
              this.map.events.unregister("movestart", this, this.hide);
          }
  
          this.events.destroy();
          this.events = null;
          
          if (this.closeDiv) {
              OpenLayers.Event.stopObservingElement(this.closeDiv); 
              this.groupDiv.removeChild(this.closeDiv);
          }
          this.closeDiv = null;
          
          this.div.removeChild(this.groupDiv);
          this.groupDiv = null;
  
          if (this.map != null) {
              this.map.removePopup(this);
          }
          this.map = null;
          this.div = null;
          
          this.autoSize = null;
          this.minSize = null;
          this.maxSize = null;
          this.padding = null;
          this.panMapIfOutOfView = null;
      }
docs: Method: destroy
  nullify references to prevent circular references and memory leaks