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:
@@ -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()}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user