Memory leak on python 2.5 if using str(dict(a='a'))

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue Apr 28 14:15:08 EDT 2009


En Tue, 28 Apr 2009 05:09:25 -0300, Benjamin Liu <liupingping at gmail.com>  
escribió:

> I use guppy-pe to identify this issue in my program. The resources links  
> are all embedded in source code already.

How do you know there is actually a memory leak here?
Can you show the leak without resorting to guppy?
If I understand correctly your example, this program:

def i(**params):
     print params

def test4():
     params = { "a":"a_value", "b":"b_value" }
     i(**params)

while True:
     test4()

should consume unlimited memory - is that what you see?
On Windows, using 2.6.2, after half an hour it still consumes the same  
amount of memory.

(Note that, even if there is a real bug in 2.5, it's too late in the  
development cycle - 2.5 gets only security fixes now)

-- 
Gabriel Genellina




More information about the Python-list mailing list