paramiko/paramiko — pull request #367 by alex-sf (2014-07-28 03:53:45+00:00)
Title: Changed channel.transport to a weakref to fix reference cycle

We're using a number of Paramiko-based SSH proxies and all of them were leaking multiple gigabytes of RAM per day. After some investigation, I noticed Channel objects were not being collected properly to a reference cycle:

![image](https://cloud.githubusercontent.com/assets/3968929/3716209/811c24ce-1605-11e4-8ab5-75d9643796db.png)

I pared down our server code considerably and sent a couple hundred of requests through the app with a stock 1.13 package to demonstrate the leak:

http://snapfiber.com/ssh-server_paramiko-1-13-unpatched.svg

After applying this change, the leak no longer exists:

http://snapfiber.com/ssh-server_paramiko-1-13-patched.svg