Roel Schroeven wrote: > AFAIK Python always does reference counting, and the garbage collector > is used only for more difficult cases. As the gc module docs say: > "Since the collector supplements the reference counting already used in > Python, you can disable the collector if you are sure your program does > not create reference cycles." > > I don't know if that's only true for CPython or also for the other > implementations.
CPython always uses reference counting, but that's not guaranteed by the language specification: "Objects are never explicitly destroyed; however, when they become unreachable they may be garbage-collected. An implementation is allowed to postpone garbage collection or omit it altogether -- it is a matter of implementation quality how garbage collection is implemented, as long as no objects are collected that are still reachable." http://pyref.infogami.com/objects </F> -- http://mail.python.org/mailman/listinfo/python-list