This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kayhayen
Recipients kayhayen
Date 2010-07-24.09:46:37
SpamBayes Score 0.00291869
Marked as misclassified No
Message-id <1279964801.22.0.925376306196.issue9366@psf.upfronthosting.co.za>
In-reply-to
Content
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 checks the total reference count for many language constructs. Sometimes a warmup can be useful, if CPython caches something, but it doesn't help in this case. Removing object or replacing it with an old style class helps.

I think I saw that 3 references of object leak, and a total of ca. 20 for each call to the function. I suspect a memory leak too.

Use the attached file for reproduction of the problem.
History
Date User Action Args
2010-07-24 09:46:41kayhayensetrecipients: + kayhayen
2010-07-24 09:46:41kayhayensetmessageid: <1279964801.22.0.925376306196.issue9366@psf.upfronthosting.co.za>
2010-07-24 09:46:39kayhayenlinkissue9366 messages
2010-07-24 09:46:38kayhayencreate