[issue22166] test_codecs leaks references

Nick Coghlan report at bugs.python.org
Sat Sep 6 14:34:42 CEST 2014


Nick Coghlan added the comment:

Ah, I think I've found a possible underlying culprit: there's a separate C level "codec_search_cache" on the interpreter object that is independent of encodings._cache.

The attached patch eliminates the reference leaks entirely (using gc.get_referrers() to get a reference to the otherwise inaccessible internal interpreter cache).

However, the patch has a bunch of changes that may not be necessary if that cache is dealt with properly, so I'm going to revert everything, and *start* with fixing the cache cleanup.

----------
Added file: http://bugs.python.org/file36559/issue22166_no_leaks_too_many_changes.diff

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


More information about the Python-bugs-list mailing list