[Python-Dev] Quick-and-dirty weak references

Jack Jansen jack@oratrix.nl
Wed, 18 Aug 1999 13:02:13 +0200


The one thing I'm not thrilled by in mxProxy is that a call to 
CheckWeakReferences() is needed before an object is cleaned up. I guess this 
boils down to the same problem I had with my weak reference scheme: you 
somehow want the Python core to tell the proxy stuff that the object can be 
cleaned up (although the details are different: in my scheme this would be 
triggered by refcount==0 and in mxProxy by refcount==1). And because objects 
are created and destroyed in Python at a tremendous rate you don't want to do 
this call for every object, only if you have a hint that the object has a weak 
reference (or a proxy).
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm