void OnDestroy() { if (m_pinnedPoints != null) { m_pinnedPoints.Dispose(); } }
// utrils public static void SafeDispose <T>(ref PinnedList <T> v) where T : struct { if (v != null) { v.Dispose(); v = null; } }