Menu

#65 Yet more leaks

open-wont-fix
nobody
None
5
2006-06-23
2006-06-23
ceeam
No

This still leaks w/ 1.5.1 (Windows, 2.4):

def test():
class Foo(object):
def boo(self):
print 'Moo'

return Foo().boo

def main():
for i in xrange(100000):
test()()

main()

Also - if you heavily use module reload()'s it does
leak heavily:

lib.py:
-------
def boo():
return 'Boo'

tmp.py:
-------
import lib

while 1:
print lib.boo()
reload(lib)

I'm about to use Python (and Psyco I hoped) for some
FastCGI apps and these leaks bother me a bit.

Discussion

  • ceeam

    ceeam - 2006-06-23

    Logged In: YES
    user_id=1457907

    Sorry for broken indents. Stupid SF :(
    Hopefully it's still clear what's going where.

     
  • Armin Rigo

    Armin Rigo - 2006-06-23
    • status: open --> open-wont-fix
     
  • Armin Rigo

    Armin Rigo - 2006-06-23

    Logged In: YES
    user_id=4771

    These are known leaks: making new types or new code objects
    dynamically, and letting Psyco see them, will lead to these
    class or code objects to become immortal. There is nothing
    simple I can do to fix them, sorry.

     

Log in to post a comment.

MongoDB Logo MongoDB