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.
Logged In: YES
user_id=1457907
Sorry for broken indents. Stupid SF :(
Hopefully it's still clear what's going where.
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.