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 nascheme
Recipients Mark.Shannon, christian.heimes, jdemeyer, lukasz.langa, methane, miss-islington, nascheme, pablogsal, petr.viktorin, pitrou, tim.peters, vstinner
Date 2019-09-30.17:45:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Would [func tp_clear] help with memory usage in functions or was BPO-33418 addressed in another way since?

Having a tp_clear for all container objects that can be involved in reference cycles will help the GC free memory.  BPO-33418 may be contrived but it does demonstrate a problem that could happen in "real" code.  If you have a long-running program, tracking down a memory leak due to reference cycles can be fiendishly difficult.  That's why Tim originally wrote cyclops and why I started working on cyclic GC in the first place.

It is a "quality of implementation" issue.  It is not wrong for CPython to leak memory if you create reference cycles (not all types are required to implement the GC protocol).  I expect users would be surprised if it happens since the majority have never used Python without the cyclic GC.
Date User Action Args
2019-09-30 17:45:13naschemesetrecipients: + nascheme, tim.peters, pitrou, vstinner, christian.heimes, petr.viktorin, methane, lukasz.langa, Mark.Shannon, jdemeyer, pablogsal, miss-islington
2019-09-30 17:45:13naschemesetmessageid: <>
2019-09-30 17:45:13naschemelinkissue38006 messages
2019-09-30 17:45:12naschemecreate