Skip to content

Commit fedcabc

Browse files
RACDelegateProxy: change property from unsafe_unretained to weak.
Note that rac_proxiedDelegate can be nil since the delegate may be released (as it's not tied to the original object's lifetime) or someone may set the delegate to nil explicitly. See also: https://stackoverflow.com/c/lightricks/questions/426/.
1 parent a9c9b53 commit fedcabc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactiveObjC/RACDelegateProxy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
1818

1919
// The delegate to which messages should be forwarded if not handled by
2020
// any -signalForSelector: applications.
21-
@property (nonatomic, unsafe_unretained) id rac_proxiedDelegate;
21+
@property (nonatomic, weak) id rac_proxiedDelegate;
2222

2323
// Creates a delegate proxy capable of responding to selectors from `protocol`.
2424
- (instancetype)initWithProtocol:(Protocol *)protocol;

0 commit comments

Comments
 (0)