[issue22534] Possible Memory Leak with 'shelve'

STINNER Victor report at bugs.python.org
Thu Oct 2 10:00:37 CEST 2014


STINNER Victor added the comment:

I modified the example a little bit to display the RSS memory 10 times. The RSS increases by +176 kB at the beginning and then it is stable.

I tested on Fedora 20 (Linux): anydbm.open('bla', 'c') creates a 'bsddb._DBWithCursor' object. Can you please give us the DBM type returned by:

$ ./python
Python 2.7.8+ (2.7:9b4673d7b046, Oct  1 2014, 00:20:22) 
>>> import anydbm
>>> d=anydbm.open('bla', 'c')
>>> type(d)
<class 'bsddb._DBWithCursor'>
>>> d.close()

The loop of your example can maybe by simplified to:

d=anydbm.open('bla', 'c')
d.close()

instead of

sh = shelve.open('blah')
sh.close()

----------
nosy: +haypo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22534>
_______________________________________


More information about the Python-bugs-list mailing list