public static void Dispose() { for (int i = 0; i < lengthTotal; i++) { Marshal.FreeHGlobal((IntPtr)entities[i].componentsIds); } UnmanagedMemory.Cleanup(); }
internal static unsafe void Dispose() { for (int i = 0; i < ProcessorEcs.Entities.Length; i++) { var meta = ProcessorEcs.Entities.Get <EntityMeta>(i); Marshal.FreeHGlobal((IntPtr)meta->components); Marshal.FreeHGlobal((IntPtr)meta->groups); } UnmanagedMemory.Cleanup(); }