[issue40255] Fixing Copy on Writes from reference counting

Pablo Galindo Salgado report at bugs.python.org
Mon Apr 13 18:51:55 EDT 2020


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

> gc.freeze() has a similar issue, no? This function also comes from Instagram specific use case ;-)

Not really because this patch is much more impacting. gc.freeze() moves objects into a permanent generation making them not participate in the GC so the only leaks are cycle-based. With this patch immortal object will leak every strong reference that they have even if they don't participate in cycles (but also if they participate in cycles).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40255>
_______________________________________


More information about the Python-bugs-list mailing list