Improve AsSpan, CopyTo, and CopyFrom for IUnsafeCollection

This commit is contained in:
2025-11-27 14:04:46 +09:00
parent f4e803e5a4
commit b67569aa14
6 changed files with 191 additions and 157 deletions

View File

@@ -40,9 +40,11 @@
// }
//}
using Misaki.HighPerformance.LowLevel.Utilities;
var arr1 = new Misaki.HighPerformance.LowLevel.Collections.UnsafeArray<int>(10, Misaki.HighPerformance.LowLevel.Buffer.Allocator.Persistent);
var arr2 = arr1;
arr2.CopyFrom(arr1.AsSpan());
arr1.Dispose();
try
{