[Zope-Checkins] CVS: Zope/lib/python/ZPublisher - HTTPRequest.py:1.58
Chris McDonough
chrism@zope.com
Sat, 1 Dec 2001 11:22:46 -0500
Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv12177
Modified Files:
HTTPRequest.py
Log Message:
Collecor #60 - Zope leaks memory like sieve.
Fixed worst of the problem by causing HTTPRequests to clear the lazy namespace at close time.
=== Zope/lib/python/ZPublisher/HTTPRequest.py 1.57 => 1.58 ===
return r
+ def close(self):
+ # we want to clear the lazy dict here because BaseRequests don't have
+ # one. Without this, there's the possibility of memory leaking
+ # after every request.
+ self._lazies = {}
+ BaseRequest.close(self)
def setServerURL(self, protocol=None, hostname=None, port=None):
""" Set the parts of generated URLs. """