destroy method
Destroy this input context and release resources.
Implementation
@override
Future<void> destroy() async {
if (_isDestroyed) return;
_isDestroyed = true;
await stopCapture();
if (_contextHandle != null) {
_finalizer.detach(this);
final res = bindings.MiniAV_Input_DestroyContext(_contextHandle!);
_contextHandle = null;
if (res != bindings.MiniAVResultCode.MINIAV_SUCCESS) {
print('Warning: MiniAV_Input_DestroyContext failed: ${res.name}');
}
}
}