[Python-Dev] Tackling circular dependencies in 2.0?

M.-A. Lemburg mal@lemburg.com
Mon, 20 Sep 1999 19:44:57 +0200

Skip Montanaro wrote:
> I think in Python 2.0 it would be nice to have some way to reclaim circular
> dependencies without the programmer explicitly having to do something like
> implement a destroy() method and requiring other programmers to (remember
> to) call it.  I forget what the current state of affairs is w.r.t. future
> memory management in Python.  Not knowing anything much about memory
> management, would it be possible to have a sort of mixed ref count/garbage
> collection system where you only use the gc stuff as a last resort?  My
> thought is that it would be useful to use gc to find and reclaim circular
> garbage.
> can-you-tell-I-just-got-bitten-by-a-circular-reference?-ly y'rs

If you don't want to wait until 2.0 becomes GA, you could try weak


Marc-Andre Lemburg
Y2000:                                                   102 days left
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/