예제 #1
0
        protected override void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (OwnsResource())
            {
                UnsafeNativeMethods.MpGlTextureBufferDestroy(ptr);
            }

            if (deletionCallbackHandle != null && deletionCallbackHandle.IsAllocated)
            {
                deletionCallbackHandle.Free();
            }

            ptr = IntPtr.Zero;

            _disposed = true;
        }