[New-bugs-announce] [issue2696] unicode string does not get freed --> memory leak?
ThurnerRupert
report at bugs.python.org
Sat Apr 26 12:07:34 CEST 2008
New submission from ThurnerRupert <rupert.thurner at credit-suisse.com>:
is it possible that str and unicode str are treated differently, i.e.
unicode str does not give memory back? jonas borgström noticed the
following behaviour:
>>> resident_size()
3780
>>> a = ["%i" % i for i in xrange(2**22)]
>>> resident_size()
239580
>>> del a
>>> resident_size()
4128 <-- Most memory returned to the os
>>> a = [u"%i" % i for i in xrange(2**22)]
>>> resident_size()
434532
>>> del a
>>> resident_size()R
401760 <-- Almost nothing returned to the os
for details see
http://groups.google.com/group/trac-dev/browse_thread/thread/9de74e1d2f62e2ed.
----------
messages: 65837
nosy: ThurnerRupert
severity: normal
status: open
title: unicode string does not get freed --> memory leak?
versions: Python 2.5
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2696>
__________________________________
More information about the New-bugs-announce
mailing list