예제 #1
0
        public void Dispose()
        {
            if (_asfMemoryStream != null)
            {
                _asfMemoryStream.Close();
                _asfMemoryStream = null;
            }

            if (_asfStream != null)
            {
                _asfStream.Close();
            }
        }
예제 #2
0
        private void Dispose(bool disposing)
        {
            if (!_disposed)
            {
                if (disposing) //managed resources
                {
                    if (_asfMemoryStream != null)
                    {
                        _asfMemoryStream.Close();
                        _asfMemoryStream = null;
                    }

                    if (_asfStream != null)
                    {
                        _asfStream.Close();
                    }
                }
                Marshal.FinalReleaseComObject(_syncReader);
                _disposed = true;
            }
        }