DisposeSentinel
Contains methods that automatically detect memory leaks.
Read time 1 minuteLast updated 13 days ago
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.