Files

27 lines
545 B
C#
Raw Permalink Normal View History

2024-05-13 01:28:33 +08:00
#if GRIFFIN
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Unity.Collections;
namespace Pinwheel.Griffin
{
public static class GNativeArrayUtilities
{
public static void Dispose<T>(NativeArray<T> array) where T : struct
{
try
{
if (array.IsCreated)
{
array.Dispose();
}
}
catch (System.InvalidOperationException)
{
}
}
}
}
#endif