Tkinter long-running window freezes
John O'Hagan
research at johnohagan.com
Fri Feb 26 21:42:26 EST 2021
On Sat, 27 Feb 2021 10:59:24 +1100
John O'Hagan <research at johnohagan.com> wrote:
> On Fri, 26 Feb 2021 08:19:14 +0100
> Christian Gollwitzer <auriocus at gmx.de> wrote:
[...]
>
> > Can you also check this program, which reuses the same widget path
> > name, albeit does the creation/destruction in cycles:
> >
> > ======================
> > package require Tk
> >
> > proc randint {} {
> > expr {int(rand()*10000000)}
> > }
> >
> > proc display {label} {
> > destroy $label
> > set label [label .l -text [randint]]
> > pack $label
> > after 100 [list display $label]
> > }
> >
> > display [label .l]
> > ========================
> >
>
> I have tried this overnight and it is still running, not frozen and
> with no apparent increase in memory use.
[...]
Correction! The window did freeze after all, and again on a second
attempt. No memory rise though, so those two issues seem to be
independent.
Thanks
--
John
More information about the Python-list
mailing list