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
Fredrik Lundh wrote:
> Do these objects have direct references to a resource that you're
> explicitly destroying from your C code?
and yes, if this is the problem, the correct solution is to create an
separate object type that's designed to manages the resource and act as
a proxy against it, a
Kyle Lanclos wrote:
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 appear to occur until I return from the particular C
function I am in the middle of executing.
Yeah, but wh
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
Kyle Lanclos wrote:
I want to modify the above sequence to manually prompt Python's garbage
collection routine(s) to take over (performance is not an issue here),
similar to the following:
Py_XDECREF (some_callback);
PyCollect_Garbage ();
closeService (some_service);
return;
Is that possible?