I want to have a program that upon clicking a button should open another toplevel window and delete the old window. If I use self.master.destroy(), it seemingly deletes the old window in addition to deleting the new window immediately. How can I destroy the old window while keeping the new window intact?

```py
import tkinter as tk

class DirSearch:
    def __init__(self,master):
        self.master = master

        self.goButton = tk.Button(master,text="Go!", command=self.openDir)
        self.goButton.grid(row=2)

    def openDir(self):
        self.newWindow = tk.Toplevel(self.master)
        self.app = DirView(self.newWindow)
        #self.master.destroy() This would destroy the new window as well as the old one

class DirView:
    def __init__(self, master):
        self.master = master
        self.frame = tk.Frame(self.master)
        self.label = tk.Label(master, text = "foo")
        self.label.grid()
        self.button = tk.Button(master, text="bar")
        self.button.grid()

if __name__ == '__main__':
    root = tk.Tk()
    app = DirSearch(root)
    root.mainloop()

```