Create(out AtomicSafetyHandle, out DisposeSentinel, int, Allocator)
Creates a new AtomicSafetyHandle and a new DisposeSentinel, to be used to track safety and leaks on native data.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: Unity.Collections.LowLevel.Unsafe
- Assembly: UnityEngine.ManagedKernelModule
Create(AtomicSafetyHandle, DisposeSentinel, int, Allocator)
public static void Create(out AtomicSafetyHandle safety, out DisposeSentinel sentinel, int callSiteStackDepth, Allocator allocator)
Parameters
The AtomicSafetyHandle to control access to the data related to the newly created DisposeSentinel.
The new DisposeSentinel.
The stack depth where to extract the logging information from.
The allocator used for the native data being tracked.
Remarks
When DisposeSentinel is created, the call stack is stored in it to log a descriptive error when a memory leak is detected.