AdvancedLauncher.Tools.Interop.RedirectedWindow.DestroyBitmap C# (CSharp) Method

DestroyBitmap() private method

private DestroyBitmap ( ) : void
return void
        private void DestroyBitmap()
        {
            _interopBitmap = null;

            if (_hDC != IntPtr.Zero) {
                NativeMethods.DeleteObject(_hDC);
                _hDC = IntPtr.Zero;
            }

            if (_hBitmap != IntPtr.Zero) {
                NativeMethods.DeleteObject(_hBitmap);
                _hBitmap = IntPtr.Zero;
            }

            _pBits = IntPtr.Zero;

            if (_hSection != IntPtr.Zero) {
                NativeMethods.CloseHandle(_hSection);
                _hSection = IntPtr.Zero;
            }

            _stride = 0;
            _bitmapWidth = 0;
            _bitmapHeight = 0;
        }