invalidate

open fun invalidate()

Permanently destroys the ReactHost, including the ReactInstance (if any). The application MUST NOT call any further methods on an invalidated ReactHost.

Applications where the ReactHost may be destroyed before the end of the process SHOULD call invalidate() before releasing the reference to the ReactHost, to ensure resources are freed in a timely manner.

NOTE: This method is designed for complex integrations. Integrators MAY instead hold a long-lived reference to a single ReactHost for the lifetime of the Application, without ever calling invalidate(). This is explicitly allowed.