1 Index: mod_python/lib/python/mod_python/apache.py
2 ===================================================================
3 RCS file: /home/devel/CVS/rhn/modules/mod_python/lib/python/mod_python/apache.py,v
4 retrieving revision 1.4
5 diff -u -r1.4 apache.py
6 --- mod_python/lib/python/mod_python/apache.py 2 Aug 2001 22:52:50 -0000 1.4
7 +++ mod_python/lib/python/mod_python/apache.py 28 Feb 2002 02:57:53 -0000
9 # variable stores the last PythonPath in raw (unevaled) form.
12 -# this is used in Request.__init__
13 -def _cleanup_request(_req):
14 - _req._Request = None
17 """ This is a normal Python Class that can be subclassed.
18 However, most of its functionality comes from a built-in
20 # look at __setattr__ if changing this line!
23 - # this will decrement the reference to the _req
24 - # object at cleanup time. If we don't do this, we
25 - # get a cirular reference and _req never gets destroyed.
26 - _req.register_cleanup(_cleanup_request, _req)
28 def __getattr__(self, attr):
30 return getattr(self._req, attr)
33 # is there a Request object for this request?
35 + # warning, creating circular reference here
36 _req._Request = Request(_req)
40 htype=htype, hname=handler, debug=debug)
44 + if htype == "PythonCleanupHandler":
45 + # destroy the circular reference
46 + _req._Request = req = None