using Unity.Collections; namespace LanLib.UpdateManager.Extensions { public static class NativeArrayExtensions { public static void DisposeIfCreated(this ref NativeArray array) where T : struct { if (array.IsCreated) { array.Dispose(); } } } }