Пример #1
0
        private void _finalize()
        {
            if (_streams != null)
            {
                _streams.Dispose();
            }

            if (_ramBitmap != null)
            {
                _ramBitmap.Dispose();
            }

            if (_ram != null)
            {
                _ram.Dispose();
            }

            if (_screen != null)
            {
                _screen.Dispose();
            }

            Native.StSessionClose(_session);
            _session = Native.INVALID_SESSION_ID;
        }
Пример #2
0
 private void Reset()
 {
     if (RequestStreamEnumerator != null)
     {
         RequestStreamEnumerator.Dispose();
         RequestStreamEnumerator = null;
     }
     if (needDisposeWhenReset && requestStreams != null)
     {
         requestStreams.Dispose();
         requestStreams = null;
     }
 }