/// <summary>
        /// Called when the host is shutting down.
        /// </summary>
        public void OnDestroy()
        {
            _nativeViewHierarchyManager.DropAllViews();

            // Must be called in the context of the dispatcher thread corresponding to this queue
            _reactChoreographer.DispatchUICallback -= OnRenderingSafe;

            // Don't dispose main choreographer, there's a great chance it will be reused
            if (!_reactChoreographer.IsMainChoreographer())
            {
                (_reactChoreographer as IDisposable).Dispose();
            }
        }