public bool FreeMemory(IntPtr address) { if (MemoryAllocations.ContainsKey(address)) { MemoryAllocations.Remove(address); return(VirtualFreeEx(ProcessHandle, address, 0, AllocationType.Release)); } return(false); }