[Python-Dev] RE: CVS Python is unstable
Neil Schemenauer
nas@arctrix.com
Fri, 23 Mar 2001 07:53:15 -0800
On Fri, Mar 23, 2001 at 10:35:24AM -0500, Fred L. Drake, Jr. wrote:
> So it's illegal to call PyObject_GC_Fini() anywhere but from the
> destructor? Please let me know so I can make this clear in the
> documentation!
No, its okay as long as the object is not reachable from other
objects. When tuples are added to the tuple free-list
PyObject_GC_Fini() is called. When they are removed
PyObject_GC_Init() is called. This is okay because free tubles
aren't reachable from anywhere else.
> It's not at all clear that we need to remove the restriction --
> documenting it would be required.
Yah, sorry about that. I had forgotten about that restriction.
When I saw Tim's message things started to come back to me. I
had to study the code a bit to remember how things worked.
Neil