fix mem alloc api

This commit is contained in:
Mikhail 2026-03-17 15:34:31 +08:00
parent 015c6be9f0
commit cc834c4a92

View File

@ -86,7 +86,7 @@ namespace DCFApixels.DragonECS.Core.Internal
#endregion #endregion
#region ReallocAndInit #region ReallocAndInit
public static HMem<T> ReallocAndInit<T>(void* target, int oldCount, int newCount) where T : unmanaged public static HMem<T> ReallocAndInit<T>(T* target, int oldCount, int newCount) where T : unmanaged
{ {
return ReallocAndInit<T>(Handler.FromDataPtr(target), oldCount, newCount); return ReallocAndInit<T>(Handler.FromDataPtr(target), oldCount, newCount);
} }
@ -117,7 +117,7 @@ namespace DCFApixels.DragonECS.Core.Internal
#endregion #endregion
#region Realloc #region Realloc
public static HMem<T> Realloc<T>(void* target, int newCount) where T : unmanaged public static HMem<T> Realloc<T>(T* target, int newCount) where T : unmanaged
{ {
return Realloc<T>(Handler.FromDataPtr(target), Marshal.SizeOf<T>() * newCount); return Realloc<T>(Handler.FromDataPtr(target), Marshal.SizeOf<T>() * newCount);
} }