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 vstinner
Recipients CharlieZhao, Jim Fasarakis-Hilliard, TCsaba, amaury.forgeotdarc, christian.heimes, corona10, eric.snow, erlendaasland, h-vetinari, isoschiz, koubaa, kumaraditya, kylotan, lukasz.langa, miss-islington, orsenthil, pconnell, petr.viktorin, phsilva, python-dev, santoso.wijaya, serhiy.storchaka, shihai1991, tlesher, vstinner, ysj.ray
Date 2022-01-27.13:42:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643290963.21.0.405966417129.issue1635741@roundup.psfhosted.org>
In-reply-to
Content
Thanks to recent enhancements, epecially in bpo-46417, the last memory blocks are now released at Python exit! The initial issue has been fixed!!! This bug was 15 years old! Current main branch:

$ ./python -I -X showrefcount -c pass
[-5 refs, 0 blocks]

"0 blocks" means that Python no longer leaks memory at exit. You can use Valgrind to check it ;-)

The negative reference count is being discussed in bpo-46449.

I close this issue since it has an insane history: too many pull requests, changes, etc.

While the work is not 100% done (we need to convert remaining static types to heap types, and convert extensions to multi-phase init), I prefer to address remaining issues in (existing or new) separated issues. See for example the bpo-40077: "Convert static types to heap types: use PyType_FromSpec()".

I would like to thank everybody who helped to fix this issue! It's hard to list all names since this issue is a meta issues made of many sub-issues which also have sub-issues. Authors of PEP 573 and PEP 630 also helped fixing this issue!
History
Date User Action Args
2022-01-27 13:42:43vstinnersetrecipients: + vstinner, amaury.forgeotdarc, orsenthil, kylotan, christian.heimes, tlesher, phsilva, petr.viktorin, ysj.ray, santoso.wijaya, lukasz.langa, python-dev, eric.snow, serhiy.storchaka, pconnell, isoschiz, Jim Fasarakis-Hilliard, corona10, miss-islington, shihai1991, erlendaasland, koubaa, h-vetinari, TCsaba, kumaraditya, CharlieZhao
2022-01-27 13:42:43vstinnersetmessageid: <1643290963.21.0.405966417129.issue1635741@roundup.psfhosted.org>
2022-01-27 13:42:43vstinnerlinkissue1635741 messages
2022-01-27 13:42:42vstinnercreate