Message296281
| Author |
terry.reedy |
| Recipients |
Saimadhav.Heblikar, Serge, Vandana.Rao, roger.serwy, sirgimp, terry.reedy |
| Date |
2017年06月18日.17:49:57 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1497808198.23.0.56057216965.issue6171@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
(In 3.6, TreeWidget.py became tree.py.)
Even though IDLE trees now appear to work correctly, including on Ubuntu, I am concerned about possible memory leaks, which are usually detected by repeatedly running a module's test file. Test_tree does not leak now, but it does not do much. In particular, it does not expand and contract items and move selections. TreeNode.draw has this note: "This leaks bindings until canvas is deleted", and I wonder if the same could be true in .drawtext.
Tree.py currently has these notes at the top:
# - keep track of object ids to allow more careful cleaning
# - optimize tree redraw after expand of subnode
Currently, self.text_id is saved, but not used. Reusing canvas items should be more efficient.
I won't edit tree.py immediately, as I intend to try using ttk.Treeview as a replacement. But we might instead update tree.py with ttk components. In the meanwhile, I will leave this open. |
|