You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RACSubject: avoid retaining the subscribers strongly in the disposable.
The `-subscribe:` method of `RACSubject` is returning a disposable that
removes the new subscriber from the collection of active subscribers to
that subject. The disposable is disposed when the new subscription is
disposed, either explicitly or by having the subject send a completion
or error.
However, for infinite subjects that are not manually disposed, the
subscriber will be kept in memory forever. This happens because the
subscriber holds the disposable, which in turns holds the subscriber.
To break the cycle, the subscriber and the collection of subscribers
needs to be held weakly.
Based on joomcode@9b27795.
0 commit comments