[Tkinter-discuss] create and delete canvas items / memory

Jeff Epler jepler at unpythonic.net
Thu Apr 13 02:52:07 CEST 2006


I've never used snack.  However, I wrote a program which repeatedly
creates and then destroyes 1000 "line" objects on a canvas:
#-----------------------------------------------------------------------
def main():
    import Tkinter
    t = Tkinter.Canvas()
    t.pack()
    while 1:
        for i in range(1000):
            t.create_line((0, i, i, 100))
        t.update()
        t.delete("all")
main()
#-----------------------------------------------------------------------
The "VIRT" column in top stabalizes at 18976.

I'm using the same system as you -- Ubuntu Breezy.

IMO this points a finger at something inside snack.

Jeff


More information about the Tkinter-discuss mailing list