Free() 정적인 개인적인 메소드

static private Free ( IntPtr ptr ) : void
ptr System.IntPtr
리턴 void
예제 #1
0
        public void Cleanup(IntPtr nativeHandle, Action callback)
        {
            // Remove handle
            if (NativeHandle != IntPtr.Zero)
            {
                Loop.handles.Remove(nativeHandle);

                UV.Free(nativeHandle);

                NativeHandle = IntPtr.Zero;

                if (Closed != null)
                {
                    Closed();
                }

                if (callback != null)
                {
                    callback();
                }

                if (GCHandle.IsAllocated)
                {
                    GCHandle.Free();
                }
            }
        }
예제 #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                GC.SuppressFinalize(this);
            }

            UV.Free(NativeHandle);
            GCHandle.Free();
            NativeHandle = IntPtr.Zero;
        }
예제 #3
0
        public virtual void Dispose(bool disposing)
        {
            if (Data != IntPtr.Zero)
            {
                if (GCHandle.IsAllocated)
                {
                    GCHandle.Free();
                }
                Data = IntPtr.Zero;
            }

            if (Handle != IntPtr.Zero)
            {
                UV.Free(Handle);
                Handle = IntPtr.Zero;
            }
        }
예제 #4
0
        protected void Dispose(bool disposing)
        {
            if (disposing)
            {
                GC.SuppressFinalize(this);
            }

            if (Handle != IntPtr.Zero)
            {
                if (destroy != null)
                {
                    destroy(Handle);
                }

                UV.Free(Handle);
                Handle = IntPtr.Zero;
            }
        }
예제 #5
0
        public virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                GC.SuppressFinalize(this);
            }

            if (Data != IntPtr.Zero)
            {
                if (GCHandle.IsAllocated)
                {
                    GCHandle.Free();
                }
                UV.Free(Data);
                Data = IntPtr.Zero;
            }

            if (Handle != IntPtr.Zero)
            {
                UV.Free(Handle);
                Handle = IntPtr.Zero;
            }
        }