title: Clear used RAM for Tkinter TEXT widget
body: <p>In my GUI I create a ttk.notebook and then put Text widgets into each tab and dump logs/info into these Text widgets. If the process is restarted with a new set of log files I <code>.forget()</code> the old tabs and then create the new ones. I've noticed that the ram used from the original Text widgets is not cleared when I do this. How can I free this ram? </p>
  
  <p>Example:</p>
  
  <pre><code>from tkinter import *
  from tkinter.ttk import Notebook
  main = Tk()
  def maker():
      nb = Notebook(main, name='nbook')
      nb.grid(row=0, column=0, columnspan=2)
      frame1 = Frame(name='frame1')
      txt = Text(frame1, wrap=NONE)
      txt.grid()
      nb.add(frame1, text='textwindow')
      txt.insert('end', 'hello\n' * 1000000)
  
  def remover():
      print(main.winfo_children())
      for tab in main.children['nbook'].tabs():
          main.children['nbook'].forget(tab)
      print(main.winfo_children())
  
  b1 = Button(main, text='Insert', command=maker)
  b1.grid(row=1, column=0)
  b2 = Button(main, text='Clear tabs', command=remover)
  b2.grid(row=1, column=1)
  main.mainloop()
  </code></pre>
  
  <p>In the example, when you click "Insert" it creates the widget and dumps a bunch of text into it. If you call remover with the "Clear tabs" button it forgets all tabs but the ram used by that text is never free. Even if you destroy the text widget the ram is not released. How can I free this up? </p>