Binarysharp.MemoryManagement.Memory.MemoryFactory.Deallocate C# (CSharp) Method

Deallocate() public method

Deallocates a region of memory previously allocated within the virtual address space of the remote process.
public Deallocate ( RemoteAllocation allocation ) : void
allocation RemoteAllocation The allocated memory to release.
return void
        public void Deallocate(RemoteAllocation allocation)
        {
            // Dispose the element
            if(!allocation.IsDisposed)
                allocation.Dispose();
            // Remove the element from the allocated memory list
            if (InternalRemoteAllocations.Contains(allocation))
                InternalRemoteAllocations.Remove(allocation);
        }