From 680715a2a2d43054ec14e6f4133e45ac3e30a497 Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Sun, 19 Jul 2020 21:40:07 +0200 Subject: [PATCH] refactor: remove some remnants from ReadProcessMemory workaround --- Dalamud/Game/ClientState/Actors/ActorTable.cs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/Dalamud/Game/ClientState/Actors/ActorTable.cs b/Dalamud/Game/ClientState/Actors/ActorTable.cs index 2f5a2224e..88af4242d 100644 --- a/Dalamud/Game/ClientState/Actors/ActorTable.cs +++ b/Dalamud/Game/ClientState/Actors/ActorTable.cs @@ -30,25 +30,9 @@ namespace Dalamud.Game.ClientState.Actors { internal void ResetCache() => actorsCache = null; #endregion - - #region temporary imports for crash workaround - - [DllImport("kernel32.dll", SetLastError = true)] - static extern bool ReadProcessMemory( - IntPtr hProcess, - IntPtr lpBaseAddress, - IntPtr lpBuffer, - int dwSize, - out IntPtr lpNumberOfBytesRead); - - #endregion - private ClientStateAddressResolver Address { get; } private Dalamud dalamud; - private static int actorMemSize = Marshal.SizeOf(typeof(Structs.Actor)); - private IntPtr actorMem { get; set; } = Marshal.AllocHGlobal(actorMemSize); - /// /// Set up the actor table collection. /// @@ -147,7 +131,6 @@ namespace Dalamud.Game.ClientState.Actors { { if (disposed) return; this.dalamud.Framework.OnUpdateEvent -= Framework_OnUpdateEvent; - Marshal.FreeHGlobal(actorMem); disposed = true; }