Exemple #1
0
        private void Free()
        {
            IntPtr handle = this._handle;

            if (handle != IntPtr.Zero && Interlocked.CompareExchange(ref this._handle, IntPtr.Zero, handle) == handle)
            {
                SizedReference.FreeSizedRef(handle);
            }
        }
Exemple #2
0
        private void Free()
        {
            IntPtr num = this._handle;

            if (!(num != IntPtr.Zero) || !(Interlocked.CompareExchange(ref this._handle, IntPtr.Zero, num) == num))
            {
                return;
            }
            SizedReference.FreeSizedRef(num);
        }