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.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 |