예제 #1
0
파일: COMGC.cs 프로젝트: Arsslensoft/ALFX
        public void Dispose()
        {
            if (_timer != null)
            {
                _timer.Cancel();

                var localObj = Interlocked.Exchange(ref _timer, null);
                if (localObj != null)
                {
                    Marshal.ReleaseComObject(localObj);
                }
            }
        }
예제 #2
0
        public void Dispose()
        {
            if (_timer != null)
            {
                _timer.Cancel();

                var localObj = Interlocked.Exchange(ref _timer, null);
                if (localObj != null)
                {
                    Marshal.ReleaseComObject(localObj);
                }

                _timer = null;
            }
            GC.SuppressFinalize(this);
        }