dcramer/raven — pull request #147 by rslinckx (2012-07-13 15:03:25+00:00)
Title: flask: Use a weakref to hold onto the Sentry object when connecting to flask's got_request_exception signal

This makes the garbage collector unable to reclaim the memory used by a Flask app.

Test case:
```python
import gc
from flask import Flask
from raven.contrib.flask import Sentry

def create_app():
app = Flask(__name__)
Sentry(app)
return app

for i in range(100):
create_app()
gc.collect()
```

The memory should stay stable, but it keeps growing because the signal stays connected.