def destroy(self):
        """ A reimplemented destructor that cancels 
        the dialog before destroying. 
        
        """
        super(AndroidPopupWindow, self).destroy()
        window = self.window
        if window:
            #: Clear the dismiss listener
            #: (or we get an error during the callback)
            window.setOnDismissListener(None)
            #window.dismiss()
            del self.window
def destroy ( self ) : super ( AndroidPopupWindow , self ) . destroy ( ) window = self . window if window : window . setOnDismissListener ( None ) del self . window
A reimplemented destructor that cancels 
        the dialog before destroying.