mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 14:23:40 +01:00
refactor: remove some remnants from ReadProcessMemory workaround
This commit is contained in:
parent
5f402950d8
commit
680715a2a2
1 changed files with 0 additions and 17 deletions
|
|
@ -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);
|
||||
|
||||
/// <summary>
|
||||
/// Set up the actor table collection.
|
||||
/// </summary>
|
||||
|
|
@ -147,7 +131,6 @@ namespace Dalamud.Game.ClientState.Actors {
|
|||
{
|
||||
if (disposed) return;
|
||||
this.dalamud.Framework.OnUpdateEvent -= Framework_OnUpdateEvent;
|
||||
Marshal.FreeHGlobal(actorMem);
|
||||
disposed = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue