Constructor UnsafeBitArray
UnsafeBitArray(void*, int, AllocatorHandle)
Initializes and returns an instance of UnsafeBitArray which aliases an existing buffer.
Declaration
public UnsafeBitArray(void* ptr, int sizeInBytes, AllocatorManager.AllocatorHandle allocator = default)
Parameters
Type | Name | Description |
---|---|---|
void* | ptr | An existing buffer. |
int | sizeInBytes | The number of bytes. The length will be |
AllocatorManager.AllocatorHandle | allocator | The allocator that was used to allocate the bytes. Needed to dispose this array. |
UnsafeBitArray(int, AllocatorHandle, NativeArrayOptions)
Initializes and returns an instance of UnsafeBitArray.
Declaration
public UnsafeBitArray(int numBits, AllocatorManager.AllocatorHandle allocator, NativeArrayOptions options = NativeArrayOptions.ClearMemory)
Parameters
Type | Name | Description |
---|---|---|
int | numBits | Number of bits. |
AllocatorManager.AllocatorHandle | allocator | The allocator to use. |
NativeArrayOptions | options | Whether newly allocated bytes should be zeroed out. |