dispose method
Implementation
Future<void> dispose() async {
await Future.wait([
if (_stdoutSubscription != null) _stdoutSubscription!.cancel(),
if (_stderrSubscription != null) _stderrSubscription!.cancel(),
if (_logSink != null) _logSink!.close(),
]);
_stdoutSubscription = null;
_stderrSubscription = null;
_logSink = null;
}