[Tim] > ...If a trash cycle contains a finalizer (my, but that has to be rare. > in practice, in well-designed code!), [Moshe Zadka] > This shows something Tim himself has often said -- he never programmed a > GUI. It's very hard to build a GUI (especially with Tkinter) which is > cycle-less, but the classes implementing the GUI often have __del__'s > to break system-allocated resources. > > So, it's not as rare as we would like to believe, which is the reason > I haven't given this answer. I wrote Cyclops.py when trying to track down leaks in IDLE. The extraordinary thing we discovered is that "even real gc" would not have reclaimed the cycles. They were legitimately reachable, because, indeed, "everything points to everything else". Guido fixed almost all of them by explicitly calling new "close" methods. I believe IDLE has no __del__ methods at all now. Tkinter.py currently contains two. so-they-contained-__del__-but-weren't-trash-ly y'rs - tim
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4