]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-123193: Document tkinter Variable lifetime (GH-152625) (GH-153099)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 5 Jul 2026 11:14:52 +0000 (13:14 +0200)
committerGitHub <noreply@github.com>
Sun, 5 Jul 2026 11:14:52 +0000 (11:14 +0000)
commitc8047891c75bda51fc773bc289f3cdf50d224b3d
treee929444101d94652eb7e62d05ea057c838f4cbc1
parent6dcb402afd1cf8ecad9a734dfefff30ca3f2928c
[3.14] gh-123193: Document tkinter Variable lifetime (GH-152625) (GH-153099)

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