memory leaks in Tkinter
Maric MICHAUD
Maric.MICHAUD at cirec.com
Tue Nov 26 09:21:11 EST 2002
I noticied some memory leak in text widget of Tkinter :
Python 2.1.1 (#1, Aug 30 2001, 17:36:05)
[GCC 2.96 20000731 (Mandrake Linux 8.1 2.96-0.61mdk)] on linux-i386
Type "copyright", "credits" or "license" for more information.
>>> s=open("a big file").read()
>>> import Tkinter
>>> t=Tkinter.Tk()
>>> x=Tkinter.Text(t)
>>> x.pack()
>>> x.insert(end, s) # growing up memory to a little
more than size of s
>>> x.delete(1.0, end) # does not free memory
>>> x.insert(end, s) # memory goes up again
>>> x.delete(1.0, end) # memory freed by only one s
>>>
Is this a bug ? A problem with the version 1.152 of Tkinter ?
More information about the Python-list
mailing list