[Python-Dev] C API for gc.enable() and gc.disable()

Alexandre Vassalotti alexandre at peadrop.com
Thu Jun 26 07:31:53 CEST 2008


On Thu, Jun 26, 2008 at 12:01 AM, "Martin v. Löwis" <martin at v.loewis.de> wrote:
>> I would it be possible, if not a good idea, to only track object
>> deallocations as the GC traversal trigger? As far as I know, dangling
>> cyclic references cannot be formed when allocating objects.
>
> Not sure what you mean by that.
>
> x = []
> x.append(x)
> del x
>
> creates a cycle with no deallocation occurring.
>

Oh... never mind then.

-- Alexandre


More information about the Python-Dev mailing list