]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-123193: Document tkinter Variable lifetime (GH-152625) (GH-153100)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 5 Jul 2026 11:13:43 +0000 (13:13 +0200)
committerGitHub <noreply@github.com>
Sun, 5 Jul 2026 11:13:43 +0000 (11:13 +0000)
commitecc59ff24a089c57e434bfc4f3a1f9f1dd41955c
tree7f49eedd390642efcb531ab439bcc360ace11412
parenta7e8d28fb2950a7306785c80629c0cbb6040b4ed
[3.13] gh-123193: Document tkinter Variable lifetime (GH-152625) (GH-153100)

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