mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-21 07:17:45 +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;
|
internal void ResetCache() => actorsCache = null;
|
||||||
#endregion
|
#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 ClientStateAddressResolver Address { get; }
|
||||||
private Dalamud dalamud;
|
private Dalamud dalamud;
|
||||||
|
|
||||||
private static int actorMemSize = Marshal.SizeOf(typeof(Structs.Actor));
|
|
||||||
private IntPtr actorMem { get; set; } = Marshal.AllocHGlobal(actorMemSize);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set up the actor table collection.
|
/// Set up the actor table collection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -147,7 +131,6 @@ namespace Dalamud.Game.ClientState.Actors {
|
||||||
{
|
{
|
||||||
if (disposed) return;
|
if (disposed) return;
|
||||||
this.dalamud.Framework.OnUpdateEvent -= Framework_OnUpdateEvent;
|
this.dalamud.Framework.OnUpdateEvent -= Framework_OnUpdateEvent;
|
||||||
Marshal.FreeHGlobal(actorMem);
|
|
||||||
disposed = true;
|
disposed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue