shutdown method

void shutdown()

Shutdown the engine and release all resources.

Implementation

void shutdown() {
  closeConversation();

  if (_engine != null && _engine != nullptr && _bindings != null) {
    _bindings!.litert_lm_engine_delete(_engine!);
    _engine = null;
    debugPrint('[LiteRtLmFfi] Engine deleted');
  }

  _isInitialized = false;
}