Refactor collections, add Remove overloads, bump version

- Bump project version to 1.3.9.
- Move HashMapHelper to Collections namespace.
- Simplify UnsafeList<T>.AddRange to use only Span<T>.
- Add Remove overloads with out parameter to UnsafeSlotMap<T> and UnsafeSparseSet<T>.
- Improve MemoryLeakException stack trace formatting.
- Remove obsolete commented code in IJobSPMD.cs.
This commit is contained in:
2026-03-02 15:16:48 +09:00
parent 9413c1ee0b
commit b9ca71834f
7 changed files with 76 additions and 45 deletions

View File

@@ -1,5 +1,6 @@
using Misaki.HighPerformance.LowLevel.Buffer;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Text;
namespace Misaki.HighPerformance.LowLevel;
@@ -45,9 +46,11 @@ public class MemoryLeakException : Exception
for (var i = 0; i < stackTrace.FrameCount; i++)
{
var frame = stackTrace.GetFrame(i);
if (frame != null)
var fileName = frame?.GetFileName();
if (frame != null && fileName != null)
{
stringBuilder.AppendLine($"File: {frame.GetFileName()}, Method: {DiagnosticMethodInfo.Create(frame)?.Name}, Line: {frame.GetFileLineNumber()}");
stringBuilder.AppendLine($"File: {fileName}, Method: {DiagnosticMethodInfo.Create(frame)?.Name}, Line: {frame.GetFileLineNumber()}");
}
}