Create(FixedString32Bytes, FixedString64Bytes, Allocator)
Creates a memory label with the specified area name, object name, and allocator.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
public static MemoryLabel Create(FixedString32Bytes areaName, FixedString64Bytes objectName, Allocator allocator = Allocator.Persistent)
Parameters
The name of the memory area.
The name of the object being labeled.
The allocator to use. Defaults to Allocator.Persistent. Only Allocator.Persistent and Allocator.Domain support memory labeling.
Returns
Type | Description |
|---|---|
| MemoryLabel | The created memory label. |
Remarks
This method can be used in Burst-compiled code with names that are not compile-time string literals.
Attempting to create a memory label with empty strings for the area name or object name, or with an unsupported allocator, throws an exception.