Jean Regisser 1e52ef23e7 Fix retain cyles in RCTNetworkTask when used with RCTFileRequestHandler and RCTDataRequestHandler
Summary: Hi,

While implementing my own `RCTURLRequestHandler` I came across retain cycles in `RCTNetworkTask` when used with `RCTFileRequestHandler` and `RCTDataRequestHandler`.

The `NSBlockOperation` used in `RCTFileRequestHandler` and `RCTDataRequestHandler` could never be dealloc'ed because of a retain cycle.
And then the second issue was that those blocks were also strongly capturing the passed delegate which in this case is the `RCTNetworkTask` itself and then since the task was storing the block as a `requestToken`, the task could never be dealloc'ed as well.

Here are my proposed fixes. Let me know what you think.
Closes https://github.com/facebook/react-native/pull/3884

Reviewed By: svcscm

Differential Revision: D2615353

Pulled By: nicklockwood

fb-gh-sync-id: a73cbecffbebea75aaeb23d39f04a0d87602926f
2015-11-04 07:16:26 -08:00
..
2015-07-24 08:41:58 -08:00
2015-10-26 15:36:14 -07:00
2015-11-03 14:49:30 -08:00
2015-11-04 04:09:27 -08:00
2015-10-30 17:09:27 -07:00
2015-09-08 03:34:33 -08:00
2015-07-24 08:41:58 -08:00
2015-11-04 04:09:27 -08:00
2015-07-24 08:41:58 -08:00