mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
03174f1cad
Summary: In the past, in Fabric (Android), we never called stopSurface. Ever! This is bad for memory and can cause other issues, so... let's not do that. Instead, when the ReactRootView is being torn down, we check the View ID to see if it's a Fabric RootView, and if it is, we call Fabric's stopSurface method. Fabric stopSurface only has impact on (1) Fabric mount instructions being executed after that point and (2) tells JS to stop running the surface, on the JS thread, asynchronously. Anecdotally it looks like all the MountItems involved in deleting and removing views from the hierarchy are executed before stopSurface is called. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D21965837 fbshipit-source-id: 5169c5a1e339fd9e016ae1234d8389b2bd30be70