[issue23769] valgrind reports leaks for test_zipimport

STINNER Victor report at bugs.python.org
Wed Mar 25 00:29:32 CET 2015


STINNER Victor added the comment:

When calling gc.collect() after each test, I don't see any leak anymore.

doTest() has a small leak: it prepends a path to sys.path, but it never removes it.

Try attached leak2.py: it displays something like +254 kB. Uncomment the two following lines and the output will be close to +0 kB.

        #sys.path = old_path
    #gc.collect()

----------
nosy: +haypo
Added file: http://bugs.python.org/file38675/leak2.py

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


More information about the Python-bugs-list mailing list