onInstanceDestroy method

  1. @override
void onInstanceDestroy(
  1. int instanceId
)
override

Implementation

@override
void onInstanceDestroy(int instanceId) {
  var viewModel = renderContext.getInstance(instanceId);
  if (viewModel != null) {
    if (viewModel.executor != null) {
      _pageUpdateTasks.remove(viewModel.executor);
    }

    _pageUpdateTasks.remove(viewModel.viewExecutor);
  }
  destroyInstance(instanceId);
}