title: React Component with Memory Leak
body: <p>I have a piece of legacy code, which renders a react component on the server on every request, which makes it obvious there is a memory leak. I have corner the problem up to this code:</p>
  
  <pre><code>  componentWillMount: function () {
      var onLogin = this.props.onLogin || function () {},
          onLogout = this.props.onLogout || function () {};
  
      this.on('authChange', function () {
        console.log('user authenticated:', this.state.isAuthenticated);
        return this.state.isAuthenticated
                ? onLogin(this.state)
                : onLogout(this.state);
      }.bind(this));
    },
  </code></pre>
  
  <p>I believe that on every request the <code>this</code> object is storing a new listener, but I don't get why the <code>this</code> element is not being marked as garbage when the rendering of the component is done.</p>