"Help needed - I don't understand how Python manages memory"

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sun Apr 20 21:48:09 EDT 2008


En Sun, 20 Apr 2008 17:23:32 -0300, Christian Heimes <lists at cheimes.de> escribió:

> Martin v. Löwis schrieb:
>> Can you give an example, please?
>
> http://trac.edgewall.org/ contains at least one example of a reference
> leak. It's holding up the release of 0.11 for a while. *scnr*
>
> The problem is also covered by the docs at
> http://docs.python.org/dev/library/sys.html#sys.exc_info

Ah, you scared me for a while... :)
Holding the traceback from sys.exc_info is not a memory leak, just prevents *a lot* of objects reaching refcount 0 as long as the execution frames are refering to them. Don't store a traceback more than needed and it should be fine...

-- 
Gabriel Genellina




More information about the Python-list mailing list