title: How would I make destroy() method in tkinter work with my code?
body: <pre><code>from tkinter import *
  
  class GameBoard(Frame):
    def __init__(self):
      Frame.__init__(self)
      self.master.title("test")
      self.grid()
      #button frame
      self.__buttonPane = Frame(self)
      self.__buttonPane.grid()
      #buttons
      self.__buttonA1 = Button(self.__buttonPane,text = "A1",command = self._close)
      self.__buttonA1.grid()
  
    def _close(self):
      GameBoard().destroy()
  
  
  def main():
    GameBoard().mainloop()
  
  main()
  </code></pre>
  
  <p>How would I make my function for close to work?</p>