STINNER Victor <[email protected]> added the comment:
I wrote an unit test to be able to re-use regrtest memory leak hunter:
import unittest
def simpleFunction59():
a = 1
try:
return a
finally:
return a
class Tests(unittest.TestCase):
def test_bug(self):
for _ in range(10):
simpleFunction59()
I confirm that there is a leak:
$ ./python -m test -R 3:3 test_bug
...
test_bug leaked [10, 10, 10] references, sum=30
...
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36725>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com