[New-bugs-announce] [issue6242] Fix reference leak in io.StringIO
Alexandre Vassalotti
report at bugs.python.org
Mon Jun 8 21:51:36 CEST 2009
New submission from Alexandre Vassalotti <alexandre at peadrop.com>:
io.StringIO does not clear its reference to its attributes dictionary
when deleted. This causes a leak when io.StringIO has attributes.
>>> def leak():
... for _ in range(100):
... f = io.StringIO()
... f.foo = 1
...
[39348 refs]
>>> leak()
[39650 refs]
>>> leak()
[39950 refs]
>>> leak()
[40250 refs]
----------
components: IO, Library (Lib)
files: fix_refleak_stringio.diff
keywords: patch
messages: 89105
nosy: alexandre.vassalotti
priority: normal
severity: normal
stage: patch review
status: open
title: Fix reference leak in io.StringIO
type: behavior
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14232/fix_refleak_stringio.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6242>
_______________________________________
More information about the New-bugs-announce
mailing list