Allocate
Allocate space in a buffer.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
Allocate<T>()
Allocate space in a buffer.
public ref T Allocate<T>() where T : unmanaged
Returns
Type | Description |
|---|---|
| T | A reference to the allocation. |
Remarks
The space is allocated in the buffer which was specified with NativeStream.Writer.BeginForEachIndex.
Allocate(int)
Allocate space in a buffer.
public byte* Allocate(int size)
Parameters
The number of bytes to allocate.
Returns
Type | Description |
|---|---|
| byte* | The allocation. |
Remarks
The space is allocated in the buffer which was specified with NativeStream.Writer.BeginForEachIndex.