Georg Brandl added the comment:
This is caused by the fact that new-style classes create reference cycles. Try
calling the cyclic garbage collector using gc.collect() after the function
call, and the leaked references will vanish again.
--
nosy: +georg.brandl
resolution: -> duplicat
New submission from Kay Hayen :
Hello,
I have created tests that check the reference counting and found that the
following simple function leaks references in CPython:
def simpleFunction39():
class Parent( object ):
pass
I have attached a test that needs to be run with python-dbg and