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 kj
Recipients christian.heimes, corona10, erlendaasland, kj, miss-islington, nascheme, pablogsal, shihai1991, vstinner
Date 2021-05-26.16:36:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1622046988.01.0.878707659375.issue42972@roundup.psfhosted.org>
In-reply-to
Content
_winapi is leaky still even with my PR:

>>> import sys,gc
>>> for _ in range(5):
...  print(sys.gettotalrefcount())
...  import _winapi
...  del sys.modules['_winapi']
...  del _winapi
...  gc.collect()
...
50468
51076
51432
51788
52144

I just noticed this, but _winapi doesn't have a m_traverse/m_clear/m_free in the PyModuleDef eventhough it creates nearly 100 objects in m_slot->Py_mod_exec. I'm not a multi phase init expert, but shouldn't there be a cleanup function or am I confusing something here :( ?
History
Date User Action Args
2021-05-26 16:36:28kjsetrecipients: + kj, nascheme, vstinner, christian.heimes, corona10, pablogsal, miss-islington, shihai1991, erlendaasland
2021-05-26 16:36:28kjsetmessageid: <1622046988.01.0.878707659375.issue42972@roundup.psfhosted.org>
2021-05-26 16:36:28kjlinkissue42972 messages
2021-05-26 16:36:27kjcreate