Commit 2b9878a
gh-123193: Document tkinter Variable lifetime
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>1 parent 089e6f6 commit 2b9878a
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
659 | 662 | | |
660 | 663 | | |
661 | 664 | | |
| |||
5916 | 5919 | | |
5917 | 5920 | | |
5918 | 5921 | | |
| 5922 | + | |
| 5923 | + | |
| 5924 | + | |
| 5925 | + | |
| 5926 | + | |
| 5927 | + | |
| 5928 | + | |
| 5929 | + | |
5919 | 5930 | | |
5920 | 5931 | | |
5921 | 5932 | | |
| |||
0 commit comments