tuples allocated by formated print ?

keirr keir at mooncode.com
Wed Sep 8 18:34:12 CEST 2004


Alexander Hoffmann wrote:
> Hello,
>
> Recently I was debugging a memory leak in my app and finally figured
out that
> I had to manually implement destructors for some classes.
> While debugging I wrote a method that prints the number of instances
per type
> for all objects returned by gc.get_objects. I was astonished by the
fact that
> after perfroming a few tests with my app there were about 4000
instances of
> Tuple in memory. Looking at these instances I got the feeling that
they
> contained the values I used in formated prints like: print ("my name
is %s" % 
> ("alex", ))
<snip>

Do these objects survive gc.collect() ?




More information about the Python-list mailing list