destroyEngine method
void
destroyEngine()
Implementation
void destroyEngine() {
// 避免重复销毁
if (_currentState == EngineState.destroyed) {
return;
}
_currentState = EngineState.destroyed;
_engineContext?.renderContext.forEachInstance(destroyInstance);
_eventListenerList.clear();
_engineContext?.destroyBridge((res) {
_engineContext?.destroy(false);
}, false);
_globalConfigs.destroy();
}