Re: Manually prompting garbage collection

2008-07-16 Thread Kyle Lanclos
Fredrik Lundh wrote: > Yeah, but what do you expect that garbage collection pass to result in? Basically, I want to toss the objects before I close the service that they depend on. > PyGC_Collect() does exactly that, so if that doesn't solve your problem, > the only way to fix is this is to go b

Re: Manually prompting garbage collection

2008-07-16 Thread Kyle Lanclos
Fredrik Lundh wrote: > what magic do you expect the "manual garbage collection" to do here that > the DECREF doesn't already do? The DECREF decrements the reference count, but does not immediately prompt garbage collection when the reference count drops to zero; that garbage collection does not a

Manually prompting garbage collection

2008-07-16 Thread Kyle Lanclos
I've done a lot of web searching, a fair bit of C-source reading, and quite a lot of miscellaneous head scratching, and I find that I am not necessarily closer to an ideal solution. I have a Python/C interface layer that essentially does the following: Py_XDECREF (some_callback); closeService (so