예제 #1
0
파일: Entity.cs 프로젝트: Allexeee/actors
        public static void Dispose()
        {
            for (int i = 0; i < lengthTotal; i++)
            {
                Marshal.FreeHGlobal((IntPtr)entities[i].componentsIds);
            }

            UnmanagedMemory.Cleanup();
        }
예제 #2
0
        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();
        }