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 vpelletier
Recipients vpelletier
Date 2012-07-02.19:29:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1341257382.75.0.880502955632.issue15240@psf.upfronthosting.co.za>
In-reply-to
Content
When storing a ctype function pointer in a ctype structure field, a reference remains even when that field is overwritten with some values:
- None
- None cast into a function pointer
But the reference is somehow removed when overwriting the field with a "real" function pointer (a lambda in attached test case).

This causes problem when the structure is a class property and function pointer is created out of a method of the same class: a circular reference is created, which is not garbage-collected.

To run the attached test case, you need objgraph[1], and to uncomment one (or none) of the commented-out lines in "close" method.

[1] http://mg.pov.lt/objgraph/
History
Date User Action Args
2012-07-02 19:29:42vpelletiersetrecipients: + vpelletier
2012-07-02 19:29:42vpelletiersetmessageid: <1341257382.75.0.880502955632.issue15240@psf.upfronthosting.co.za>
2012-07-02 19:29:41vpelletierlinkissue15240 messages
2012-07-02 19:29:41vpelletiercreate