SwiftlyS2

CUtlMemory

Struct CUtlMemory

Namespace: SwiftlyS2.Shared.Natives

Assembly: SwiftlyS2.CS2.dll

public struct CUtlMemory<T>
Type Parameters
  • T

Inherited Members

Constructors

CUtlMemory(int, int)

Please use SwiftlyS2.Shared.Natives.ManagedCUtlMemory%601 instead to construct it. If you really want to use this, you should call SwiftlyS2.Shared.Natives.CUtlMemory%601.Purge after you are done with it.

public CUtlMemory(int growSize, int initSize)
Parameters

CUtlMemory(nint, int, bool)

Please use SwiftlyS2.Shared.Natives.ManagedCUtlMemory%601 instead to construct it. If you really want to use this, you should call SwiftlyS2.Shared.Natives.CUtlMemory%601.Purge after you are done with it.

public CUtlMemory(nint memory, int numelements, bool readOnly)
Parameters

Properties

Base

public nint Base { get; }
Property Value

Count

public int Count { get; }
Property Value

ElementSize

public int ElementSize { get; }
Property Value

ExternallyAllocated

public bool ExternallyAllocated { get; }
Property Value

IsReadOnly

public bool IsReadOnly { get; }
Property Value

this

public ref T this[int index] { get; }
Property Value
  • T

Methods

AssumeMemory(nint, int)

public void AssumeMemory(nint memory, int numelements)
Parameters

ConvertToGrowableMemory(int)

public void ConvertToGrowableMemory(int growSize)
Parameters

DetachMemory()

public nint DetachMemory()
Returns

EnsureCapacity(int)

public void EnsureCapacity(int num)
Parameters

Grow(int)

public void Grow(int num)
Parameters

Init(int, int)

public void Init(int growSize, int initSize)
Parameters

IsValidIndex(int)

public bool IsValidIndex(int index)
Parameters
Returns

Purge()

public void Purge()

Purge(int)

public void Purge(int numElements)
Parameters
  • numElements int

SetExternalBuffer(nint, int, bool)

public void SetExternalBuffer(nint memory, int numelements, bool readOnly)
Parameters

SetGrowSize(int)

public void SetGrowSize(int size)
Parameters

On this page