Unity.Collections.LowLevel.Unsafe 中的类
/
指示 NativeContainer 在作业完成后是否可以自动释放。
将此属性应用于您希望使用 DeallocateOnJobCompletionAttribute 自动释放的原生容器类型。原生容器必须包含以下字段
m_Buffer 的指针类型字段。m_AllocatorLabel 的 Allocator 类型字段。作业系统使用这些字段的值在作业完成后自动释放原生容器。其他资源:DeallocateOnJobCompletionAttribute
[NativeDisableUnsafePtrRestriction]
internal void* m_Buffer;
internal Allocator m_AllocatorLabel;
#if ENABLE_UNITY_COLLECTIONS_CHECKS
[NativeSetClassTypeToNullOnSchedule]
internal DisposeSentinel m_DisposeSentinel;
#endif