Re: Circular references not being cleaned up by Py_Finalize()

2008-03-26 Thread Hrvoje Niksic
blackpawn [EMAIL PROTECTED] writes: 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

Circular references not being cleaned up by Py_Finalize()

2008-03-25 Thread blackpawn
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

Re: Circular references not being cleaned up by Py_Finalize()

2008-03-25 Thread Marc 'BlackJack' Rintsch
On Tue, 25 Mar 2008 12:32:17 -0700, blackpawn wrote: 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. Then you want something that's not guaranteed by the language. Ciao, Marc 'BlackJack' Rintsch --

Re: Circular references not being cleaned up by Py_Finalize()

2008-03-25 Thread Christian Heimes
blackpawn schrieb: 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? Does the Noddy example use GC (Py_TPFLAGS_HAVE_GC)? Container objects must use the cycle GC or

Re: Circular references not being cleaned up by Py_Finalize()

2008-03-25 Thread Paul McGuire
On Mar 25, 2:32 pm, blackpawn [EMAIL PROTECTED] wrote: 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

Re: Circular references not being cleaned up by Py_Finalize()

2008-03-25 Thread blackpawn
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