Constructor UnsafeList
UnsafeList(T*, int)
Initializes and returns an instance of UnsafeList.
Declaration
public UnsafeList(T* ptr, int length)
Parameters
| Type | Name | Description |
|---|---|---|
| T* | ptr | An existing byte array to set as the internal buffer. |
| int | length | The length. |
UnsafeList(int, AllocatorHandle, NativeArrayOptions)
Initializes and returns an instance of UnsafeList.
Declaration
public UnsafeList(int initialCapacity, AllocatorManager.AllocatorHandle allocator, NativeArrayOptions options = NativeArrayOptions.UninitializedMemory)
Parameters
| Type | Name | Description |
|---|---|---|
| int | initialCapacity | The initial capacity of the list. |
| AllocatorManager.AllocatorHandle | allocator | The allocator to use. |
| NativeArrayOptions | options | Whether newly allocated bytes should be zeroed out. |