STINNER Victor added the comment: The following code leaks one reference: f = _io._WindowsConsoleIO('CONIO$', 'r') f.close() f = None ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue30601> _______________________________________