Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ReactiveObjC/RACSubject.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ - (RACDisposable *)subscribe:(id<RACSubscriber>)subscriber {
[subscribers addObject:subscriber];
}

@weakify(subscriber, subscribers);
[disposable addDisposable:[RACDisposable disposableWithBlock:^{
@strongify(subscriber, subscribers);
@synchronized (subscribers) {
// Since newer subscribers are generally shorter-lived, search
// starting from the end of the list.
Expand Down