Oliver Schoenborn wrote: > Those objects that have "registered" themselves to the "cleaner" require > finally-ization. Hence, if no objects registered themselves, there is only > the overhead of an empty finally. The implementation details can worry about > how registration takes place, and who does the cleanup. In scope.py, > "registration" is handled by derivation from class NeedsFinalization -- > which I can eventually rename so please let's not get stuck on terminology > at this stage. The cleaner is a function called ScopeGuardian. I'm still uncertain, though, as to what objects precisely should get the cleanup calls: *All* objects that have registered with the cleaner, or only some of them? If all objects: what if nested function calls each have to-clean objects, and only the inner function returns? Why is it then useful to also clean objects that where created in an outer function? If only some objects: which ones? Regards, Martin
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