From: Ben Darnell Date: Mon, 21 Apr 2014 04:26:40 +0000 (-0400) Subject: Help out the CPython GC by clearing some references in IOLoop.close. X-Git-Tag: v4.0.0b1~91^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33370aa7fb618c9585cb756c5228bae94d8630ec;p=thirdparty%2Ftornado.git Help out the CPython GC by clearing some references in IOLoop.close. This prevents some of the ResourceWarnings from the test suite on python 3.3 (older versions didn't report the leaks; newer versions are better at freeing generators). Since this is in IOLoop.close, it mainly affects tests. --- diff --git a/tornado/ioloop.py b/tornado/ioloop.py index 208db8853..e980a2f06 100644 --- a/tornado/ioloop.py +++ b/tornado/ioloop.py @@ -592,6 +592,8 @@ class PollIOLoop(IOLoop): self.close_fd(fd) self._waker.close() self._impl.close() + self._callbacks = None + self._timeouts = None def add_handler(self, fd, handler, events): fd, obj = self.split_fd(fd)