react-native/React/CxxBridge
Mehdi Mulani 1f9fc0ee3a Stop CxxBridge run loop when bridge is invalidated
Summary:
This fixes the `testModulesAreDeallocated` test. It was sometimes failing because the bridge's module was still alive. I debugged with the Xcode memory graph and found that the bridge was actually kept alive by a pointer from the NSThread.
By killing the runloop on the thread, the thread will eventually die and thus free the bridge.

One thing I didn't investigate was whether the thread was alive because of it receiving actual messages or just because the run loop was spinning.

Reviewed By: javache

Differential Revision: D5729925

fbshipit-source-id: 304f526129d2c5e137bfd791a6f957f6169b783e
2017-08-30 09:46:31 -07:00
..
NSDataBigString.h Create NSDataBigString 2017-02-20 05:00:58 -08:00
NSDataBigString.mm Create NSDataBigString 2017-02-20 05:00:58 -08:00
RCTCxxBridge.mm Stop CxxBridge run loop when bridge is invalidated 2017-08-30 09:46:31 -07:00
RCTCxxBridgeDelegate.h Add a delegate hook for providing a different JS implementation 2017-07-19 13:49:32 -07:00
RCTJSCHelpers.h Tease apart React and RCTBatchedBridge targets 2017-03-21 18:31:23 -07:00
RCTJSCHelpers.mm Cleanup Platform 2017-06-07 10:19:01 -07:00
RCTMessageThread.h Create JS executor and context on main thread w/ custom JSC 2017-06-06 04:45:51 -07:00
RCTMessageThread.mm Create JS executor and context on main thread w/ custom JSC 2017-06-06 04:45:51 -07:00
RCTObjcExecutor.h Rename Executor to JSExecutor 2017-06-23 17:01:25 -07:00
RCTObjcExecutor.mm Remove legacy JSC profiler 2017-07-20 04:21:16 -07:00