]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-123193: Document tkinter Variable lifetime (GH-152625)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 5 Jul 2026 11:07:12 +0000 (14:07 +0300)
committerGitHub <noreply@github.com>
Sun, 5 Jul 2026 11:07:12 +0000 (14:07 +0300)
commit820b6ca22d72482e2e68dd738cc370535c83655e
tree3a34388b78bff75768a4bc4ccde2a6f71b1fceb8
parent99b4cdbfa1619a3901f8cf87d3b5fe8d4894e3e7
gh-123193: Document tkinter Variable lifetime (GH-152625)

A Tk variable wrapper unsets its Tcl variable when garbage collected, so a
reference must be kept while a widget uses it.  Otherwise Tk recreates the Tcl
variable but never unsets it again, leaking it.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Doc/library/tkinter.rst