facebook/tornado — pull request #767 by homm (2013-04-28 17:52:14+00:00)
Title: Remove reference to last task and its arguments to free memory faster

Hello. I have a problem with Tornado and big data processing. Take a look at this code:

```python
from tornado import web, ioloop, gen

class MainHandler(web.RequestHandler):
@web.asynchronous
@gen.engine
def get(self):
self.write("Hello, world
")
yield gen.Task(self.some_task, "0123456789" * 100 * 20000)
self.finish()

def some_task(self, bigdata, callback):
self.write("some task
")
callback()

application = web.Application([
(r"/", MainHandler),
],
debug=True,
)

if __name__ == "__main__":
application.listen(8888)
ioloop.IOLoop.instance().start()
```

Almost each time after request python increase memory usage by 20Mb (`"0123456789" * 100 * 20000`) and stay hold it until next garbage collection. This happen because Runner instance has reference to last running task after engine stop. I fix it and add regression test.