[issue10068] global objects created in some module are not destroyed when last reference to that module is released

Benjamin Peterson report at bugs.python.org
Tue Oct 12 23:16:42 CEST 2010


Benjamin Peterson <benjamin at python.org> added the comment:

Tricky. I think the only way to do this properly is to call _PyModule_Clear when the dict is destroyed. However, there's no good way to flag a dictionary as a "module" dict. Therefore, I propose we remove the Py_REFCNT == 1 guard in module_dealloc, and simply leave as an open bug that modules will clear their dictionaries on deallocation. Thoughts?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10068>
_______________________________________


More information about the Python-bugs-list mailing list