react-native-macos/React/Base
Mehdi Mulani 947e71a922 Add RCTWeakProxy to properly deallocate RCTUIImageViewAnimated
Summary:
@public
CADisplayLink strongly holds onto its target, so you have to use a weak proxy object to pass the target into the CADisplayLink.

Previously we passed a weak-self point (i.e. weakSelf) but this did not have the intended effect, since the pointer to self would still be passed to CADisplayLink, and thus it would hold onto the RCTUIImageViewAnimated strongly.

So is weakSelf doing anything other than using self?
It is but it's very minor and not useful. In the case that the object got de-allocated between assigning self to weakSelf and creating the CADisplayLink, then we would pass a nil target. This is actually impossible though because we are running an instance method, so self is implicitly retained! So semantically it is something different but in practice it is the same as passing self through.

Notes:
* This system was added originally in https://github.com/facebook/react-native/pull/24822
* https://github.com/facebook/react-native/pull/25636 then "enabled" this system by deprecating existing approach

Reviewed By: fkgozali

Differential Revision: D16939869

fbshipit-source-id: 7a0e947896f23aa30ad074d1dcb4d4db7543e00a
2019-08-22 10:16:52 -07:00
..
Surface Fix crash during reload on Marketplace Home 2019-08-12 10:52:44 -07:00
RCTAssert.h Crash reporting heaven (#23691) 2019-03-12 19:41:51 -07:00
RCTAssert.m Crash reporting heaven (#23691) 2019-03-12 19:41:51 -07:00
RCTBridge+Private.h Remove compiler warning (#23588) 2019-02-22 01:40:09 -08:00
RCTBridge.h Fix typos (#25770) 2019-07-23 03:23:11 -07:00
RCTBridge.m Initial UIKitForMac support (#25427) 2019-07-04 10:30:33 -07:00
RCTBridgeDelegate.h iOS: register lazy nativemodules on startup when Chrome is attached 2018-11-02 00:16:16 -07:00
RCTBridgeMethod.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTBridgeModule.h Fix typos (#25770) 2019-07-23 03:23:11 -07:00
RCTBundleURLProvider.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTBundleURLProvider.m Unify "Hot Reloading" and "Reload-on-Save" into "Fast Refresh" 2019-06-24 13:54:39 -07:00
RCTComponentEvent.h Fix typos (#25770) 2019-07-23 03:23:11 -07:00
RCTComponentEvent.m Fix typos (#25770) 2019-07-23 03:23:11 -07:00
RCTConvert.h Fix RNTester build 2018-09-17 12:33:01 -07:00
RCTConvert.m Back out "[react-native][PR] [iOS] Add convert compatible of NSString for bridge message data" 2019-06-24 07:13:46 -07:00
RCTCxxConvert.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTCxxConvert.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTDefines.h Update loading pre-bundled message 2019-08-07 09:34:46 -07:00
RCTDisplayLink.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTDisplayLink.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTErrorCustomizer.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTErrorInfo.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTErrorInfo.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTEventDispatcher.h Fix event ordering when combining coalescable and non-coalescable events (#24693) 2019-05-09 10:36:56 -07:00
RCTEventDispatcher.m Fix event ordering when combining coalescable and non-coalescable events (#24693) 2019-05-09 10:36:56 -07:00
RCTFrameUpdate.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTFrameUpdate.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTImageSource.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTImageSource.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTInvalidating.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTJSStackFrame.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTJSStackFrame.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTJavaScriptExecutor.h iOS changes to switch to JSI 2018-10-18 01:06:24 -07:00
RCTJavaScriptLoader.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTJavaScriptLoader.mm iOS changes to switch to JSI 2018-10-18 01:06:24 -07:00
RCTKeyCommands.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTKeyCommands.m Remove compatible system code for iOS8 and before (#23656) 2019-02-26 07:58:52 -08:00
RCTLog.h Back out OSS-only change from D14811733 and fix regression in open source iOS tests 2019-04-11 12:57:15 -07:00
RCTLog.mm Remove asl_log (Fixes #25380) (#25382) 2019-06-28 01:38:40 -07:00
RCTManagedPointer.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTManagedPointer.mm Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTModuleData.h RN iOS: Support View Manager Commands that are strings 2019-06-26 10:05:33 -07:00
RCTModuleData.mm Fix typos (#25770) 2019-07-23 03:23:11 -07:00
RCTModuleMethod.h Add support for argument conversion via RCTConvert 2019-03-22 16:23:40 -07:00
RCTModuleMethod.mm Fix typos (#25770) 2019-07-23 03:23:11 -07:00
RCTMultipartDataTask.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTMultipartDataTask.m Remove compatible system code for iOS8 and before (#23656) 2019-02-26 07:58:52 -08:00
RCTMultipartStreamReader.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTMultipartStreamReader.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTNullability.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTParserUtils.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTParserUtils.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTPerformanceLogger.h - fix crash on performance logger (#24821) 2019-05-18 08:36:15 -07:00
RCTPerformanceLogger.m - fix crash on performance logger (#24821) 2019-05-18 08:36:15 -07:00
RCTReloadCommand.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTReloadCommand.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTRootContentView.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTRootContentView.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTRootView.h Fix typos (#25770) 2019-07-23 03:23:11 -07:00
RCTRootView.m Deprecation of `-[RCTRootView cancelTouches]` 2019-06-11 07:31:42 -07:00
RCTRootViewDelegate.h Fix typos (#25770) 2019-07-23 03:23:11 -07:00
RCTRootViewInternal.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTVRemoteHandler.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTVRemoteHandler.m Differentiate swipe and tap events (#22916) 2019-01-15 16:29:38 -08:00
RCTTouchEvent.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTouchEvent.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTouchHandler.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTTouchHandler.m Fix typos (#25770) 2019-07-23 03:23:11 -07:00
RCTURLRequestDelegate.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTURLRequestHandler.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTUtils.h Add utility methods for enabling high quality error messages 2019-07-24 19:39:29 -07:00
RCTUtils.m Add utility methods for enabling high quality error messages 2019-07-24 19:39:29 -07:00
RCTVersion.h iOS Buck: Create CoreModules sub-target 2019-07-01 15:20:01 -07:00
RCTVersion.m Lazily create RCTVersion dict 2019-07-12 16:51:28 -07:00
RCTWeakProxy.h Add RCTWeakProxy to properly deallocate RCTUIImageViewAnimated 2019-08-22 10:16:52 -07:00
RCTWeakProxy.m Add RCTWeakProxy to properly deallocate RCTUIImageViewAnimated 2019-08-22 10:16:52 -07:00