Binarysharp.MemoryManagement.Memory.RemoteAllocation.RemoteAllocation C# (CSharp) Method

RemoteAllocation() private method

Initializes a new instance of the RemoteAllocation class.
private RemoteAllocation ( MemorySharp memorySharp, int size, MemoryProtectionFlags protection = MemoryProtectionFlags.ExecuteReadWrite, bool mustBeDisposed = true ) : System
memorySharp MemorySharp The reference of the object.
size int The size of the allocated memory.
protection MemoryProtectionFlags The protection of the allocated memory.
mustBeDisposed bool The allocated memory will be released when the finalizer collects the object.
return System
        internal RemoteAllocation(MemorySharp memorySharp, int size, MemoryProtectionFlags protection = MemoryProtectionFlags.ExecuteReadWrite, 
                                 bool mustBeDisposed = true)
            : base(memorySharp, MemoryCore.Allocate(memorySharp.Handle, size, protection))
        {
            // Set local vars
            MustBeDisposed = mustBeDisposed;
            IsDisposed = false;
        }