DisposeSentinel
Contains methods that automatically detect memory leaks.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Class
- Namespace: Unity.Collections.LowLevel.Unsafe
- Assembly: UnityEngine.CoreModule
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 MallocTracked method over where possible.
DisposeSentinelDisposeSentinelDisposeSentinelNativeContainerDisposeSentinelDisposeSentinelDisposeSentinelYou can only use the class when ENABLE_UNITY_COLLECTIONS_CHECKS is defined.
DisposeSentinelAdditional Resources: the example in NativeContainerAttribute.