destroy method

void destroy(
  1. bool isReload
)

Implementation

void destroy(bool isReload) {
  if (isReload) {
    _renderContext.rootViewModelMap.forEach((rootId, viewModel) {
      _renderContext.destroyRootView(rootId, isReload);
      viewModel.restart();
    });
  }
  _devtoolsManager?.destroy(isReload: isReload);
  _bridgeManager.destroy();
  _moduleManager.destroy();
  _vfsManager.destroy();
  _renderContext.destroy(isReload);
  _instanceLifecycleEventListeners.clear();
  _engineLifecycleEventListeners.clear();
}