public unsafe FastUncheckedRectInt32ArrayWrapper(UnsafeList <RectInt32> list, int startIndex, int length) { RectInt32[] numArray; int num; list.GetArray(out numArray, out num); this.arrayGCHandle = SafeGCHandle.Alloc <RectInt32[]>(numArray, GCHandleType.Pinned); this.pArray = (RectInt32 *)((((IntPtr)startIndex) * sizeof(RectInt32)) + ((void *)this.arrayGCHandle.AddrOfPinnedObject())); this.count = length; }
public unsafe void Dispose() { DisposableUtil.Free <SafeGCHandle <RectInt32[]> >(ref this.arrayGCHandle); this.pArray = null; this.count = -1; }
public unsafe FastUncheckedRectInt32ArrayWrapper(RectInt32[] array, int startIndex, int length) { this.arrayGCHandle = SafeGCHandle.Alloc <RectInt32[]>(array, GCHandleType.Pinned); this.pArray = (RectInt32 *)((((IntPtr)startIndex) * sizeof(RectInt32)) + ((void *)this.arrayGCHandle.AddrOfPinnedObject())); this.count = length; }