To GC or not to GC?

Terry Reedy tjreedy at udel.edu
Wed Nov 27 13:33:47 EST 2002


> Kenny Tilton <ktilton at nyc.rr.com> writes:
>
> > Sorry, I looked at Python years ago and thought I saw /manual/ ref
> > counting, but maybe that was just the stuff done by C code (which
I
> > understand is ineluctable).

Yes.  If you interact with the C Python interpreter with C code by
using the C API, you must learn about ref counting and occasionally
use incref(ob) and decref(ob).  Makes you appreciate what the
interpreter hides when we write Python code.  (It also hides numerous
system and compiler differences and incompatibilities, but that's
another story.)

TJR





More information about the Python-list mailing list