disposeInstance method
Tear down the session. Releases the codec and any held surface / texture. Safe to call repeatedly; no-op once disposed.
Implementation
@override
Future<void> disposeInstance(int handle) async {
disposeCalls.add(handle);
final controller = _events.remove(handle);
await controller?.close();
}