(original) (raw)
import _tkinter import threading tcl = _tkinter.create() def leak_it(): sample_leak = (['xxxx'] * 200, ) * 20 while True: tcl.call("test", *sample_leak) def test(*args): pass t = threading.Thread(target=leak_it) tcl.createcommand("test", test) tcl.createcommand("leak_it", t.start) tcl.call("after", 1, "leak_it") tcl.mainloop()