July 21st, 2013, 05:07 PM
Tkinter, how to properly destroy() objects.
I've got a Python vector of Tkinter widgets.
These widgets are items that a user can delete at any time.
Currently, to delete all widgets I run
It seems that this is creating a small memory leak in the Windows 7 build.
for i in vector_of_widgets
Is this not the proper way to delete a vector of widgets?
If I call destroy() on a ScrolledText widget the scroll bar is left behind. Is this a bug? Do widgets not destroy their children turn?
When using Tkinter's variables to hold Widget data (checkboxes etc)
do I also need to free them somehow when their widget is destroyed?
Currently I'm working with Python 2.7.
Nobody to my knowledge has covered dynamic deletion and addition of widgets at runtime. This is why I'm using a vector for the functionality.
Thanks for the help. Using Tkinter has been quite a chore as they seem to want to mandate where you store data for the widgets.