[issue31558] gc.freeze() - an API to mark objects as uncollectable

Barry A. Warsaw report at bugs.python.org
Mon Sep 25 15:02:35 EDT 2017


Barry A. Warsaw added the comment:

I like the idea of a gen 4 that never gets collected.  This would have been useful for the original problem that inspired me to add the `generation` argument to `gc.collect()`.  The nice thing about this, is just as you suggest: you could force a collection of gen 4 by `gc.collect(3)`.

It's unfortunate that you'd have to add a bit to handle this, but maybe you're right that we only really need three generations.

----------

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


More information about the Python-bugs-list mailing list