Skip to content

Commit

Permalink
Fixed retain cycle in RCTFBHTTPRequestHandler
Browse files Browse the repository at this point in the history
Summary: Following common ObjC pattern, we have to store delegates as weak pointers.

Reviewed By: mmmulani

Differential Revision: D6558886

fbshipit-source-id: 11a710a7e9e17d7c6a78ae46b53b043f44ccf8e5
  • Loading branch information
shergin authored and facebook-github-bot committed Dec 14, 2017
1 parent 71751e9 commit 85503a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions React/Base/RCTURLRequestHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* itself. This will be used later to refer to the request in callbacks. The
* `sendRequest:withDelegate:` method *must* return before calling any of the
* delegate methods, or the delegate won't recognize the token.
* Following common Objective-C pattern, `delegate` will not be retained.
*/
- (id)sendRequest:(NSURLRequest *)request
withDelegate:(id<RCTURLRequestDelegate>)delegate;
Expand Down

0 comments on commit 85503a0

Please sign in to comment.