コード例 #1
0
    private async void OnDestroy()
    {
        await _controller?.UnregisterAsync();

        await _controller?.DisposeAsync();

        _controller = null;
        await _channel?.ShutdownAsync();

        _channel = null;
    }
コード例 #2
0
        protected override async void OnClosed(EventArgs e)
        {
            base.OnClosed(e);
            (_unityLibrary as IDisposable)?.Dispose();
            _unityLibrary = null;
            await _controller?.UnregisterAsync();

            await _controller?.DisposeAsync();

            _controller = null;
            await _channel?.ShutdownAsync();
        }