diff --git a/Misaki.HighPerformance.LowLevel/Buffer/AllocationManager.cs b/Misaki.HighPerformance.LowLevel/Buffer/AllocationManager.cs index 2ce5f58..58dfe97 100644 --- a/Misaki.HighPerformance.LowLevel/Buffer/AllocationManager.cs +++ b/Misaki.HighPerformance.LowLevel/Buffer/AllocationManager.cs @@ -171,7 +171,7 @@ public static unsafe class AllocationManager private static volatile bool s_initialized; private static nuint s_threadLocalStackSize; - private static readonly SpinLock s_stackLocker = new SpinLock(false); + private static SpinLock s_stackLocker = new SpinLock(false); private static VirtualStack** s_ppStack; private static int s_ppStackCount; private static int s_ppStackCapacity; diff --git a/Misaki.HighPerformance.Test/UnitTest/Buffer/TestAllocationManager.cs b/Misaki.HighPerformance.Test/UnitTest/Buffer/TestAllocationManager.cs index 68bf5d0..c9e27ef 100644 --- a/Misaki.HighPerformance.Test/UnitTest/Buffer/TestAllocationManager.cs +++ b/Misaki.HighPerformance.Test/UnitTest/Buffer/TestAllocationManager.cs @@ -36,6 +36,8 @@ public class TestAllocationManager Assert.IsFalse(ptr1.IsCreated); Assert.IsFalse(ptr2.IsCreated); + + AllocationManager.ResetTempAllocator(); } [TestMethod]