Manually prompting garbage collection
Kyle Lanclos
lanclos at ucolick.org
Wed Jul 16 21:46:08 EDT 2008
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 back to the drawing board (and even
> if it would fix this, it's a good idea to get back to the drawing board
> anyway; Python's not C++, and code that relies on destructors to fire in
> a specific order, or before a specific event, is bound to fail sooner or
> later.)
I suspect that this is the root of the answer to my question-- if I can't
rely on triggering the collection in a specific sequence, I'll need to
implement my workaround.
Your time and attention is greatly appreciated--
--Kyle
More information about the Python-list
mailing list