DisposeSentinel
Contains methods that automatically detect memory leaks.
阅读时间1 分钟最后更新于 12 小时前
Definition
- Type: Class
- Namespace: Unity.Collections.LowLevel.Unsafe
- Assembly: UnityEngine.ManagedKernelModule
public sealed class DisposeSentinel
Remarks
The methods in are used by NativeContainer instances to automatically track memory leaks, and report them to you. However, you should use the UnsafeUtility.MallocTracked method over where possible.
DisposeSentinelDisposeSentinelDisposeSentinelNativeContainerDisposeSentinelDisposeSentinelDisposeSentinelYou can only use the class when ENABLE_UNITY_COLLECTIONS_CHECKS is defined.
DisposeSentinelAdditional Resources: NativeContainerAttribute
Static Methods
Method | Description |
|---|---|
| Clear | Clears the |
| Create | Creates a new AtomicSafetyHandle and a new DisposeSentinel, to be used to track safety and leaks on native data. |
| Dispose | Releases the |