G
Gerhard Häring
import sys
def foo():
class C(object):
pass
foo()
print ">>", sys.gettotalrefcount()
foo()
print ">>", sys.gettotalrefcount()
foo()
print ">>", sys.gettotalrefcount()
[9779 refs]
Both Python 2.4 and 2.5 don't clean up properly here. Why is this?
Aren't classes supposed to be garbage-collected?
-- Gerhard
def foo():
class C(object):
pass
foo()
print ">>", sys.gettotalrefcount()
foo()
print ">>", sys.gettotalrefcount()
foo()
print ">>", sys.gettotalrefcount()
[9779 refs]
Both Python 2.4 and 2.5 don't clean up properly here. Why is this?
Aren't classes supposed to be garbage-collected?
-- Gerhard