Message349041
Tkinter calls Tcl_DeleteInterp when a Tk object is garbage collected, and it registers a cleanup callback for each registered command, which according to the Tcl docs should be called upon Tcl_DeleteInterp[1]. So this must either be a bug in Tcl or something in the circumstances isn't giving it a chance to clean up the commands.
It's worth noting that Tk.destroy() calls Misc.destroy() which explicitly calls deletecommand for all registered commands. So calling .destroy() when done with a Tk instance, which is good practice in general, will also avoid this issue.
Considering the above, I'm not sure this is worth investigating and addressing...
A simple solution could be to add __del__ to Tk or Misc and have that also clean up any registered commands. |
|
Date |
User |
Action |
Args |
2019-08-05 09:57:44 | taleinat | set | recipients:
+ taleinat, gpolo, serhiy.storchaka, WKraus |
2019-08-05 09:57:44 | taleinat | set | messageid: <1564999064.46.0.759319124364.issue36756@roundup.psfhosted.org> |
2019-08-05 09:57:44 | taleinat | link | issue36756 messages |
2019-08-05 09:57:44 | taleinat | create | |
|