internal void Create() { m_Impl = (WorldUnmanagedImpl *)UnsafeUtility.Malloc(sizeof(WorldUnmanagedImpl), 16, Allocator.Persistent); #if ENABLE_UNITY_COLLECTIONS_CHECKS m_Safety = AtomicSafetyHandle.Create(); #endif }
internal void Dispose() { #if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle.CheckDeallocateAndThrow(m_Safety); AtomicSafetyHandle.Release(m_Safety); #endif UnsafeUtility.Free(m_Impl, Allocator.Persistent); m_Impl = null; }