Beispiel #1
0
        public SizedReference(object target)
        {
            IntPtr handle = IntPtr.Zero;

            handle       = SizedReference.CreateSizedRef(target);
            this._handle = handle;
        }
Beispiel #2
0
        private void Free()
        {
            IntPtr handle = this._handle;

            if (handle != IntPtr.Zero && Interlocked.CompareExchange(ref this._handle, IntPtr.Zero, handle) == handle)
            {
                SizedReference.FreeSizedRef(handle);
            }
        }
Beispiel #3
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);
        }