Skip to content

[3.15] gh-123193: Document tkinter Variable lifetime (GH-152625)#153098

Merged
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-820b6ca-3.15
Jul 5, 2026
Merged

[3.15] gh-123193: Document tkinter Variable lifetime (GH-152625)#153098
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-820b6ca-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

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 820b6ca)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 4.8 noreply@anthropic.com

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 820b6ca)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@read-the-docs-community

Copy link
Copy Markdown

@serhiy-storchaka serhiy-storchaka merged commit a862fbc into python:3.15 Jul 5, 2026
38 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jul 5, 2026
@miss-islington miss-islington deleted the backport-820b6ca-3.15 branch July 5, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants