ReactiveCocoa/ReactiveCocoa — pull request #865 by kastiglione (2013-10-13 19:49:06+00:00)
Title: Behavior of -bind: stopping

:warning: **Not Ready to Merge** :warning:

When looking into #860, I noticed something about `-bind:`, and investigated it further. The TL;DR is that `-bind:` doesn't always stop when told to, but it's a theoretical problem at this point, since all of the existing operations that use `-bind:`'s stopping mechanism, still work as expected.

As you'll see from the test, if `-bind:` is given a signal to subscribe to that continues to live on past the time at which `-bind:` is instructed to stop, the `-bind:` will in fact continue to subscribe to new signals. Currently, the existing tests and operations that use `-bind:`'s stop mechanism all return synchronous signals, primarily `+return:`, which allows `-bind:` to still stop because its internal `signals` array becomes empty.

I see two solutions, if this is something deemed a problem:

1. Keep a `stop` flag per `-bind:` which is tested before calling `addSignal`.
2. Dispose the source signal.

Thoughts?