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 brandtbucher
Recipients brandtbucher, pablogsal
Date 2020-10-09.19:17:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1602271068.86.0.423346630238.issue41984@roundup.psfhosted.org>
In-reply-to
Content
Currently, we don't track instances of certain heap types based on the assumption that "no members" == "no reference cycles".

Unfortunately, it's still possible to create untracked reference cycles with one's parents. The following program leaks memory:

while True:
    class C:
        __slots__ = ()
    C.i = C()
    del C

The fix is simple: track all instances of user-defined classes, no exceptions. I'm not sure we were actually getting any real wins from the old behavior anyways.
History
Date User Action Args
2020-10-09 19:17:48brandtbuchersetrecipients: + brandtbucher, pablogsal
2020-10-09 19:17:48brandtbuchersetmessageid: <1602271068.86.0.423346630238.issue41984@roundup.psfhosted.org>
2020-10-09 19:17:48brandtbucherlinkissue41984 messages
2020-10-09 19:17:48brandtbuchercreate