public void Dispose() { Marshal.FreeHGlobal(NativePointer->WaitSemaphores); Marshal.FreeHGlobal(NativePointer->BufferBinds); Marshal.FreeHGlobal(NativePointer->ImageOpaqueBinds); Marshal.FreeHGlobal(NativePointer->ImageBinds); Marshal.FreeHGlobal(NativePointer->SignalSemaphores); MemUtil.Free((IntPtr)NativePointer); NativePointer = null; GC.SuppressFinalize(this); }
public BindSparseInfo() { NativePointer = (Unmanaged.BindSparseInfo *)MemUtil.Alloc(typeof(Unmanaged.BindSparseInfo)); NativePointer->SType = StructureType.BindSparseInfo; }