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(),