STINNER Victor <victor.stin...@gmail.com> added the comment: "Maybe we should prevent collection of garbage with circular references (that has __del__() or weakref callbacks) from PyObject_GC_New()?"
That would be a major change in the garbage collector. I would prefer to not touch the GC, any change can introduce a complex regression. Running the GC when an object is allocated makes sense to me. It's to reclaim memory, and prevent a MemoryError which would only be caused by "missed GC". ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31165> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com