[Python-Dev] PyGC_Collect ignores state of `enabled`

Neil Schemenauer nas at arctrix.com
Mon May 16 00:48:50 EDT 2016


Hi,

I intended for gc.collect() to actually collect cycles even if the
auto-GC was disabled.  Having Py_Finalize() run GC even when it has
been disabled seems wrong to me.  Originally, cyclic GC was supposed
to be optional.  Back then, most programs did not leak cycles.  I
would vote for Py_Finalize() checking the 'enabled' flag and not
calling PyGC_Collect if false.

Regards,

  Neil



More information about the Python-Dev mailing list