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 Robin.Schreiber
Recipients Robin.Schreiber, belopolsky, loewis
Date 2013-08-13.08:34:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376382870.55.0.0981684837191.issue15849@psf.upfronthosting.co.za>
In-reply-to
Content
Updated the patch, corrected multiple syntax errors and missing INCREFS. Also added the comments that include the members names. I am yet undecided regarding the NULL-check for FindModule.

Apart from that I have tried to build some tests that prove that loading and unloading the module do not cause any memory leaks. This has turned up several problems: For one, the only possibility to check for the leaks that PEP 3121 tries to fix, is to run PyInit of the respective module multiple times. This is only possible if Py_finalize() has been called after the module has been imported beforehand. This means we can not test for these leaks from within Python, but need some C-Code that calls
Py_initialize(); ... import xx ... Py_finalize(); multiple times. The problem is that also the plain Py_initialize(); Py_finalize(); calls leak memory. Unfortunately the amount of objects that are leaked also seems to vary, so there is no constant factor that I can subtract to determine how much the imported module itself leaks.
So I am kind of on a dead end here. I could upload the tests scripts that I have written so far, if that helps.
History
Date User Action Args
2013-08-13 08:34:30Robin.Schreibersetrecipients: + Robin.Schreiber, loewis, belopolsky
2013-08-13 08:34:30Robin.Schreibersetmessageid: <1376382870.55.0.0981684837191.issue15849@psf.upfronthosting.co.za>
2013-08-13 08:34:30Robin.Schreiberlinkissue15849 messages
2013-08-13 08:34:29Robin.Schreibercreate