From: Ben Darnell Date: Wed, 1 Sep 2010 22:16:57 +0000 (-0700) Subject: Remove __del__ method from HTTPResponse. Closing cStringIO objects isn't X-Git-Tag: v1.1.0~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0aae8f9052b8b05059cfbe4f94972beb28b4f9b5;p=thirdparty%2Ftornado.git Remove __del__ method from HTTPResponse. Closing cStringIO objects isn't really necessary, and the presence of a __del__ method prevents python's GC from breaking cyclical references (which happen on errors as HTTPError and HTTPResponse refer to each other). Closes #125. --- diff --git a/tornado/httpclient.py b/tornado/httpclient.py index cfa0b4c60..049a1cd11 100644 --- a/tornado/httpclient.py +++ b/tornado/httpclient.py @@ -469,10 +469,6 @@ class HTTPResponse(object): args = ",".join("%s=%r" % i for i in self.__dict__.iteritems()) return "%s(%s)" % (self.__class__.__name__, args) - def __del__(self): - if self.buffer is not None: - self.buffer.close() - class HTTPError(Exception): """Exception thrown for an unsuccessful HTTP request.