bpo-33418: Add tp_clear for function object by methane · Pull Request #8058 · python/cpython

Conversation

Without tp_clear, GC can't break cyclic reference.
It will cause memory leak when cyclic reference is
created intentionally.

serhiy-storchaka

@serhiy-storchaka

I have doubts about backporting this change. This can expose bugs when a ref cycle be broken at unexpected place.

Yhg1s pushed a commit that referenced this pull request

Sep 10, 2019

Labels

type-bug

An unexpected behavior, bug, or error