[Python-Dev] A little GC confusion

David Abrahams David Abrahams" <david.abrahams@rcn.com
Thu, 21 Feb 2002 09:42:34 -0500

----- Original Message -----
From: "Thomas Heller" <thomas.heller@ion-tof.com>

> From: "David Abrahams" <david.abrahams@rcn.com>
> > Hi All,
> >
> > The following extension module (AA) is a reduced example of what I'm
> > to make extension
> > classes in 2.2. I followed the examples given by typeobject.c. When I
> > "import AA,pdb" I get a crash in GC.
> For me it crashes after
>   import AA, gc
>   gc.collect()
> (Win2k Prof, SP1, MSVC6.0)
> I'm not really sure, but it seems your code does not crash any longer
> if you remove the Py_TPFLAGS_HAVE_GC from your definition of

Yes, I'm aware of that. What I don't understand is how  the builtin metatype
gets away with Py_TPFLAGS_HAVE_GC when some of its instance types are not
even heap-allocated.