mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 18:14:37 +08:00
Update MemoryAllocator.cs
This commit is contained in:
parent
b9329d7384
commit
1c2cbdc9f3
@ -72,7 +72,9 @@ namespace DCFApixels.DragonECS.Core.Internal
|
|||||||
newHandledPtr->ID = id;
|
newHandledPtr->ID = id;
|
||||||
newHandledPtr->ByteLength = byteLength;
|
newHandledPtr->ByteLength = byteLength;
|
||||||
|
|
||||||
|
#if DRAGONECS_DEEP_DEBUG
|
||||||
_debugInfos[id].stackTrace = new System.Diagnostics.StackTrace();
|
_debugInfos[id].stackTrace = new System.Diagnostics.StackTrace();
|
||||||
|
#endif
|
||||||
_debugInfos[id].type = type;
|
_debugInfos[id].type = type;
|
||||||
_debugInfos[id].handler = handler;
|
_debugInfos[id].handler = handler;
|
||||||
#endif
|
#endif
|
||||||
@ -130,7 +132,9 @@ namespace DCFApixels.DragonECS.Core.Internal
|
|||||||
Meta* newHandledPtr = (Meta*)Marshal.ReAllocHGlobal((IntPtr)target.GetHandledPtr(), (IntPtr)newByteLength + sizeof(Meta));
|
Meta* newHandledPtr = (Meta*)Marshal.ReAllocHGlobal((IntPtr)target.GetHandledPtr(), (IntPtr)newByteLength + sizeof(Meta));
|
||||||
Handler handler = Handler.FromHandledPtr(newHandledPtr);
|
Handler handler = Handler.FromHandledPtr(newHandledPtr);
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
#if DRAGONECS_DEEP_DEBUG
|
||||||
_debugInfos[newHandledPtr->ID].stackTrace = new System.Diagnostics.StackTrace();
|
_debugInfos[newHandledPtr->ID].stackTrace = new System.Diagnostics.StackTrace();
|
||||||
|
#endif
|
||||||
_debugInfos[newHandledPtr->ID].type = newType;
|
_debugInfos[newHandledPtr->ID].type = newType;
|
||||||
_debugInfos[newHandledPtr->ID].handler = handler;
|
_debugInfos[newHandledPtr->ID].handler = handler;
|
||||||
#endif
|
#endif
|
||||||
@ -188,7 +192,9 @@ namespace DCFApixels.DragonECS.Core.Internal
|
|||||||
internal struct HandlerDebugInfo
|
internal struct HandlerDebugInfo
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
#if DRAGONECS_DEEP_DEBUG
|
||||||
public System.Diagnostics.StackTrace stackTrace;
|
public System.Diagnostics.StackTrace stackTrace;
|
||||||
|
#endif
|
||||||
public Type type;
|
public Type type;
|
||||||
public Handler handler;
|
public Handler handler;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user