[issue4373] Reference leaks in Python 3.0rc3

Amaury Forgeot d'Arc report at bugs.python.org
Fri Nov 21 10:07:49 CET 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

I have studied this some time ago. The xx module comes each time from a
different file (in a directory created with tempfile.mkdtemp).

Every instance of the module creates a new entry in the static
"extensions" dictionary in Python/import.c. This entry at least contains
a copy of the module dictionary, which explains the number of "leaked"
references.

I do not see any way to clear this dictionary. The proposed patch is
probably the best thing to do.

----------
nosy: +amaury.forgeotdarc

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


More information about the Python-bugs-list mailing list