Sorry, something went wrong.
|
I' ve checked the memory leak with these scripts and no leaks found ./python.exe -m test test_dbm_gnu -R 3:3
def test_gdbm(self):
code = textwrap.dedent(r"""
import glob
import test.support
dbm = test.support.import_module('_gdbm')
# or dbm = test.support.import_module('dbm')
_fname = test.support.TESTFN
def delete_files():
for f in glob.glob(_fname + "*"):
test.support.unlink(f)
f = dbm.open(_fname, 'n')
f[b'g'] = b"indented"
f.close()
delete_files()
""")
ret = test.support.run_in_subinterp(code)
self.assertEqual(ret, 0)
|
Sorry, something went wrong.
|
Note that dbm = test.support.import_module('dbm') is leaked at the master branch :) |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM.
Minor remarks:
But I don't think that it's worth it to address these minor things. If you care, you may also update _dbmmodule.c. Maybe in a follow-up PRs.
Sorry, something went wrong.
|
Note that dbm = test.support.import_module('dbm') is leaked at the master branch :) Maybe open an issue to track this bug. |
Sorry, something went wrong.
|
Maybe open an issue to track this bug. Well, I added a comment to: https://bugs.python.org/issue40987#msg371679 |
Sorry, something went wrong.
|
Maybe open an issue to track this bug Oh I mean the subinterpreter test with dbm = test.support.import_module('dbm')is leaked |
Sorry, something went wrong.
|
With this change, there is no leak. Oh ok, that's great! Sorry, I misunderstood your comment. |
Sorry, something went wrong.
https://bugs.python.org/issue1635741