mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #6242: Fix deallocator of io.StringIO and io.BytesIO.
This commit is contained in:
parent
4f1f422713
commit
fc477048e1
3 changed files with 17 additions and 6 deletions
|
@ -338,6 +338,13 @@ class MemoryTestMixin:
|
|||
self.assertEqual(test1(), buf)
|
||||
self.assertEqual(test2(), buf)
|
||||
|
||||
def test_instance_dict_leak(self):
|
||||
# Test case for issue #6242.
|
||||
# This will be caught by regrtest.py -R if this leak.
|
||||
for _ in range(100):
|
||||
memio = self.ioclass()
|
||||
memio.foo = 1
|
||||
|
||||
|
||||
class PyBytesIOTest(MemoryTestMixin, MemorySeekTestMixin, unittest.TestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue