[mod_python] Circular references starting from the request object are not collected

Nicolas Lehuen nicolas at lehuen.com
Thu Sep 9 22:03:02 EDT 2004

Mike Bayer wrote :
> workaround: use a weakref for one side of the circular reference.
> import weakref
> req.foobar = weakref.ref(myfoobar)

Indeed, I thought about using a weakref, alas the request object cannot be
weak referenced (there again, native code must implement a few trick to
support weak references).



More information about the Mod_python mailing list