Re: Circular references not being cleaned up by Py_Finalize()
> Does the Noddy example use GC (Py_TPFLAGS_HAVE_GC)? Container objects > must use the cycle GC or circular referneces aren't broken. Have you > tried calling PyGC_Collect() multiple times? Yeah the Noddy example is from "2.1.3 Supporting cyclic garbage collection" part of the Python docs. They list sample C and Python code which I cut and pasted with no changes and on Py_Finalize and app shut down it leaks the object. I know the garbage collector is tracking the object because it properly calls the traverse function but for whatever reason it never calls the clear function. Does anyone have experience with circular references and had success with it or the example in the docs? -- http://mail.python.org/mailman/listinfo/python-list
Circular references not being cleaned up by Py_Finalize()
I've been trying to get garbage collection of circular references to work properly with no success then I noticed the documentation stating that it just doesn't: >From documentation on Py_Finalize() -> "Memory tied up in circular references between objects is not freed. " I copy pasted the Noddy example for circular reference breaking from the documentation and set a break point in its Noddy_dealloc function and sure enough even that simple example doesn't work properly. So what's the deal here? :) I want all objects to be freed when I shut down and their destruction functions to be properly called. Is there really no way to make this happen? Many thanks for any insights, Jim -- http://mail.python.org/mailman/listinfo/python-list