2009/10/16 Neil Schemenauer <nas at arctrix.com>: > After some experimentation I realize this idea is not ready yet. > The main problem comes from references to Python objects that > modules keep but don't expose to the garbage collector. For example, > gcmodule.c has a static pointer "tmod" that is a reference to the > "time" module. This reference prevents the "time" module from being > freed during interpreter shutdown. > > Ideally, I suppose modules should be treated like any other object > and have tp_traverse and tp_clear methods that deal with these sorts > of pointers. They would have to delegated to the instance since each > module would have its own implementation. Note since python 3.0 (and PEP 3121), the PyModuleDef structure has some members like m_traverse, m_clear and m_free for this very purpose. So far, nobody cared to implement these methods for any module. Maybe one should start at least for static PyObject* that contain references to modules. -- Amaury Forgeot d'Arc
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