def METHOD_NAME(self):
    with self.lock:
        self.hide()
        if self.frame:
            self.frame.Close()
            del self.frame
            self.frame = None
        self.shown = False