]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] gh-123193: Document tkinter Variable lifetime (GH-152625) (GH-153098)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 5 Jul 2026 11:15:56 +0000 (13:15 +0200)
committerGitHub <noreply@github.com>
Sun, 5 Jul 2026 11:15:56 +0000 (11:15 +0000)
commita862fbc7f00931d4ac85dc6dc5a22cbe35f08c7d
tree526d0b4c586eb45fde37d283aee14b08387ff0b2
parent67d782c6bc76578a1ed28e82953a9013bc6226bd
[3.15] gh-123193: Document tkinter Variable lifetime (GH-152625) (GH-153098)

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.
(cherry picked from commit 820b6ca22d72482e2e68dd738cc370535c83655e)

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