react-native/React/Base
wenzhao.yin 47f834a76d fix RCTMultipartDataTask Memory leaks
Summary:
In the Docs of `NSURLSession` ,

>IMPORTANT

>The session object keeps a strong reference to the delegate until your app exits or explicitly >invalidates the session. If you do not invalidate the session, your app leaks memory until it exits.

The RCTMultipartDataTask will cause memory leaks, it will make `RCTBatchedBridge` and ` RCTMultipartDataTask` will not release.

So call `[session finishTasksAndInvalidate];` at the end of `startTask` function.
Closes https://github.com/facebook/react-native/pull/12673

Reviewed By: shergin

Differential Revision: D4896497

Pulled By: javache

fbshipit-source-id: eb5f8761f67ad33a7de081a68a9a7e1d4329bfc0
2017-04-20 03:45:25 -07:00
..
RCTAssert.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTAssert.m Display JS exceptions and stacks in a red box. 2016-06-30 19:43:28 -07:00
RCTBatchedBridge.mm Fixing Race condition that happens with _wasBatchActive 2017-04-19 03:00:53 -07:00
RCTBridge+JavaScriptCore.h Add JSC utility header to RCTBridge 2017-04-07 11:16:59 -07:00
RCTBridge+Private.h Add block-based initializer for RCTModuleData 2017-04-07 11:16:59 -07:00
RCTBridge.h Add JSC utility header to RCTBridge 2017-04-07 11:16:59 -07:00
RCTBridge.m Add JSC utility header to RCTBridge 2017-04-07 11:16:59 -07:00
RCTBridgeDelegate.h Make the choice of bridge based on an optional delegate method 2017-03-21 18:31:23 -07:00
RCTBridgeMethod.h Support sync method calls in the objc bridge 2016-09-05 07:44:00 -07:00
RCTBridgeModule.h Add build-time check that module methods are exported correctly 2017-03-07 10:45:36 -08:00
RCTBundleURLProvider.h allow fetching any resource under js folder via packager 2016-10-20 11:43:44 -07:00
RCTBundleURLProvider.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTConvert.h Add display:none support to react native 2017-03-01 09:16:05 -08:00
RCTConvert.m Add display:none support to react native 2017-03-01 09:16:05 -08:00
RCTDefines.h Add RCT_PROFILE define 2016-06-13 04:28:38 -07:00
RCTDisplayLink.h
RCTDisplayLink.m Remove last arg from RCTProfileEnd, make macro's function-like 2016-09-05 11:13:33 -07:00
RCTErrorCustomizer.h Add ability to customize error messages and stacks within the iOS redbox 2016-07-18 11:28:36 -07:00
RCTErrorInfo.h Add ability to customize error messages and stacks within the iOS redbox 2016-07-18 11:28:36 -07:00
RCTErrorInfo.m Add ability to customize error messages and stacks within the iOS redbox 2016-07-18 11:28:36 -07:00
RCTEventDispatcher.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTEventDispatcher.m Dispatch native handled events to JS 2016-11-23 05:43:35 -08:00
RCTFrameUpdate.h
RCTFrameUpdate.m
RCTImageSource.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageSource.m Support bundle argument for image loading 2016-08-31 17:43:49 -07:00
RCTInvalidating.h
RCTJSCErrorHandling.h Tease apart React and RCTBatchedBridge targets 2017-03-21 18:31:23 -07:00
RCTJSCErrorHandling.mm More verbose error messages for iOS 2017-04-18 14:19:13 -07:00
RCTJSStackFrame.h Class for JS stack frames instead of dictionaries 2016-07-11 06:13:32 -07:00
RCTJSStackFrame.m Report JS errors in debug console 2017-04-05 19:51:03 -07:00
RCTJavaScriptExecutor.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTJavaScriptLoader.h JavaScriptLoader BCBundle version check 2017-01-11 22:28:43 -08:00
RCTJavaScriptLoader.mm Simplifying Struct definition. 2017-02-20 04:30:19 -08:00
RCTKeyCommands.h
RCTKeyCommands.m Cleanup warnings 2016-07-12 05:59:12 -07:00
RCTLog.h Replacing all instances of [UIApplication sharedApplication] wi… 2017-04-01 03:34:41 -07:00
RCTLog.mm Replacing all instances of [UIApplication sharedApplication] wi… 2017-04-01 03:34:41 -07:00
RCTModuleData.h Improve constant extraction from RCTNativeModule 2017-04-08 15:18:08 -07:00
RCTModuleData.mm Improve constant extraction from RCTNativeModule 2017-04-08 15:18:08 -07:00
RCTModuleMethod.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTModuleMethod.m Move bindKeys to RCTBridge setUp 2017-03-31 05:31:26 -07:00
RCTMultipartDataTask.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTMultipartDataTask.m fix RCTMultipartDataTask Memory leaks 2017-04-20 03:45:25 -07:00
RCTMultipartStreamReader.h Add multipart response stream reader 2016-10-03 18:13:36 -07:00
RCTMultipartStreamReader.m Add multipart response download task (2nd edition) 2016-10-11 12:28:42 -07:00
RCTNullability.h
RCTParserUtils.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTParserUtils.m
RCTPerformanceLogger.h Refactor measuring native requires 2016-09-09 15:28:44 -07:00
RCTPerformanceLogger.m Refactor measuring native requires 2016-09-09 15:28:44 -07:00
RCTPlatform.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTPlatform.m Merge RCTPlatform.isTesting and RCTRunningInTestEnvironment 2017-03-30 10:02:35 -07:00
RCTReloadCommand.h Refactor reload command in React Native 2016-12-07 20:13:22 -08:00
RCTReloadCommand.m Refactor reload command in React Native 2016-12-07 20:13:22 -08:00
RCTRootContentView.h Setting `availableSize` for `RCTRootShadowView` on earlier stage 2017-03-08 19:00:14 -08:00
RCTRootContentView.m Setting `availableSize` for `RCTRootShadowView` on earlier stage 2017-03-08 19:00:14 -08:00
RCTRootView.h RCTRootView's `intrinsicSize` property was deprecated in favour of `intrinsicContentSize` 2017-02-27 14:04:58 -08:00
RCTRootView.m RCTRootView is now has empty autoresizing mask by default 2017-03-19 22:01:56 -07:00
RCTRootViewDelegate.h RCTRootView's `intrinsicSize` property was deprecated in favour of `intrinsicContentSize` 2017-02-27 14:04:58 -08:00
RCTRootViewInternal.h RCTRootView's `intrinsicSize` property was deprecated in favour of `intrinsicContentSize` 2017-02-27 14:04:58 -08:00
RCTTVRemoteHandler.h Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTTVRemoteHandler.m Fix warnings in React.xcodeproj 2017-03-23 11:36:17 -07:00
RCTTouchEvent.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTouchEvent.m New way to handle simultaneously active gesture recognizers in RCTTouchHandler 2017-01-12 12:13:28 -08:00
RCTTouchHandler.h Nobody outside RCTTouchHandler should treat it as UIGestureRecognizer subclass 2017-01-09 00:13:33 -08:00
RCTTouchHandler.m `reactRespondsToTouch:` was removed 2017-04-10 12:32:31 -07:00
RCTURLRequestDelegate.h
RCTURLRequestHandler.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTUtils.h Fix warnings in React.xcodeproj 2017-03-23 11:36:17 -07:00
RCTUtils.m Merge RCTPlatform.isTesting and RCTRunningInTestEnvironment 2017-03-30 10:02:35 -07:00
RCTWebSocketObserverProtocol.h Expose more of RCTWebSocketObserver 2016-12-08 07:44:38 -08:00