destroy
Entrypoint to destroy the ReactInstance. If the ReactInstance is reloading, will wait until reload is finished, before destroying.
The destroy operation is asynchronous and the task returned by this method will complete when React Native gets destroyed. Note that the destroy operation will execute in multiple threads, in particular some of the sub-tasks will run in the UIThread. Calling TaskInterface.waitForCompletion from the UIThread will lead into a deadlock. Use destroy passing the onDestroyFinished callback to be notified when React Native gets destroyed.
Return
A task that completes when React Native gets destroyed.
Parameters
describing why ReactHost is being destroyed (e.g. memory pressure)
exception that caused the trigger to destroy ReactHost (or null) This exception will be used to log properly the cause of destroy operation.
Entrypoint to destroy the ReactInstance. If the ReactInstance is reloading, will wait until reload is finished, before destroying.
The destroy operation is asynchronous and the task returned by this method will complete when React Native gets destroyed. Note that the destroy operation will execute in multiple threads, in particular some of the sub-tasks will run in the UIThread. Calling TaskInterface.waitForCompletion from the UIThread will lead into a deadlock. Use onDestroyFinished callback to be notified when React Native gets destroyed.
Return
A task that completes when React Native gets destroyed.
Parameters
describing why ReactHost is being destroyed (e.g. memory pressure)
exception that caused the trigger to destroy ReactHost (or null) This exception will be used to log properly the cause of destroy operation.
callback that will be called when React Native gets destroyed, the callback will run on a background thread.