From b01b406e9e862832d5d27d2a92bf87c7eece3d47 Mon Sep 17 00:00:00 2001 From: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Sat, 21 Mar 2026 23:56:11 +0800 Subject: [PATCH] fix --- src/Internal/Allocators/MemoryAllocator.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Internal/Allocators/MemoryAllocator.cs b/src/Internal/Allocators/MemoryAllocator.cs index e35b8ff..2036f74 100644 --- a/src/Internal/Allocators/MemoryAllocator.cs +++ b/src/Internal/Allocators/MemoryAllocator.cs @@ -32,6 +32,7 @@ namespace DCFApixels.DragonECS.Core.Internal } internal static HandlerDebugInfo[] CreateCurrentHandlersList_Debug() { +#if DEBUG var result = new HandlerDebugInfo[_idDispenser.Count]; int i = 0; foreach (var id in _idDispenser) @@ -40,6 +41,9 @@ namespace DCFApixels.DragonECS.Core.Internal } SortHalper.SortBy(result, o => o.increment); return result; +#else + return Array.Empty(); +#endif } #region AllocAndInit @@ -171,7 +175,9 @@ namespace DCFApixels.DragonECS.Core.Internal // id = _idDispenser.UseFree(); // } //#endif +#if DEBUG var id = target.GetHandledPtr()->ID; +#endif Meta* newHandledPtr = (Meta*)Marshal.ReAllocHGlobal( (IntPtr)target.GetHandledPtr(),