On 30/12/2012 9:52pm, Antoine Pitrou wrote: > If you have an object with a __del__ method as a module global, the > cyclic gc will refuse to consider the module globals at all (which > means it will affect unrelated objects). > > So, yes, I think the shutdown purge is still necessary. Perhaps there > are ways to make it smarter. With my earlier suggestion a module deleted from sys.modules before shutdown can have an unreclaimable global dict (if it contains a global with a __del__ method). Perhaps, instead, modules could use a weakrefable subclass of dict for their globals dicts. The module destructor could save the global dicts of deleted modules in a registry. At shutdown any remaining globals dicts can be purged. -- Richard
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