Ejemplo n.º 1
0
        public SizedReference(object target)
        {
            IntPtr handle = IntPtr.Zero;

            handle       = SizedReference.CreateSizedRef(target);
            this._handle = handle;
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
        }