// CleanUp operations private void CleanUpPOD(IntPtr native) { Marshal.FreeCoTaskMem(Marshal.ReadIntPtr(native, newFileSymbolPathOffset)); if (IntPtr.Zero != Marshal.ReadIntPtr(native, oldFileSymbolPathArrayOffset)) { for (int i = 0; i < GetOldFileCount(native); ++i) { Marshal.FreeCoTaskMem( Marshal.ReadIntPtr( Marshal.ReadIntPtr(native, oldFileSymbolPathArrayOffset), i * Marshal.SizeOf(typeof(IntPtr)))); } Marshal.FreeCoTaskMem(Marshal.ReadIntPtr(native, oldFileSymbolPathArrayOffset)); } if (IntPtr.Zero != Marshal.ReadIntPtr(native, interleaveMapArrayOffset)) { for (int i = 0; i < GetOldFileCount(native); ++i) { Marshal.FreeCoTaskMem( Marshal.ReadIntPtr( Marshal.ReadIntPtr(native, interleaveMapArrayOffset), i * Marshal.SizeOf(typeof(IntPtr)))); } Marshal.FreeCoTaskMem(Marshal.ReadIntPtr(native, interleaveMapArrayOffset)); } PatchAPIMarshaler.ReleaseMainStruct(native); }
private void CleanUpPOFI_A(IntPtr native) { for (int i = 0; i < GetOldFileCount(native); ++i) { PatchAPIMarshaler.CleanUpPOFI((IntPtr)((Int64)native + i * patchOldFileInfoSize)); } PatchAPIMarshaler.ReleaseMainStruct(native); }