Re: Garbage collector strategy

2004-12-22 Thread "Martin v. Löwis"
Martin Drautzburg wrote: Just for curiosity: does python use a mark-and-sweep garbage collector or simple reference counting? I can't resist: Yes, it does. In the latter case it would not garbage collect circular references, right ? Python uses refcounting for all objects, and a generational colle

Re: Garbage collector strategy

2004-12-22 Thread Fredrik Lundh
Martin Drautzburg wrote: > Just for curiosity: does python use a mark-and-sweep garbage collector > or simple reference counting? python the language doesn't specify this, but I assume you meant the CPython interpreter. both, sort of: it uses reference counting, and a separate "cycle breaking"

Re: Garbage collector strategy

2004-12-22 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Martin Drautzburg <[EMAIL PROTECTED]> writes Just for curiosity: does python use a mark-and-sweep garbage collector or simple reference counting? In the latter case it would not garbage collect circular references, right ? gcmodule.c in the python sources shows the