File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ CFDataRef SSYInterappServerCallBackCreateData(
76
76
SSYInterappServer* server = (__bridge SSYInterappServer*)info ;
77
77
78
78
NSObject <SSYInterappServerDelegate> * delegate = [server delegate ] ;
79
+ /* We temporarily retain the delegate in case the delegate in case
80
+ external actors release it too soon. */
81
+ [delegate retain ];
79
82
[delegate interappServer: server
80
83
didReceiveHeaderByte: headerByte
81
84
data: rxPayload] ;
@@ -84,6 +87,7 @@ CFDataRef SSYInterappServerCallBackCreateData(
84
87
NSMutableData * responseData ;
85
88
char responseHeaderByte = [delegate responseHeaderByte ] ;
86
89
NSData * responsePayload = [delegate responsePayload ] ;
90
+ [delegate release ];
87
91
if (responseHeaderByte || responsePayload) {
88
92
responseData = [[NSMutableData alloc ] init ] ;
89
93
if (responseHeaderByte != 0 ) {
You can’t perform that action at this time.
0 commit comments