/// <summary> /// 释放资源。 /// </summary> public void Dispose() { if (!isInitialized) { return; } Close(); SpeechEnable = false; if (Frame != null) { Frame.Dispose(); Frame = null; } if (Face != null) { Face.Dispose(); Face = null; } if (FaceDic != null) { FaceDic.Clear(); FaceDic = null; } FaceDetectSDK.Exit();//关闭识别库 isInitialized = false; }