All checks were successful
Publish NuGet Packages / publish (push) Successful in 1m47s
27 lines
539 B
C#
27 lines
539 B
C#
using System.Threading;
|
|
|
|
namespace Misaki.HighPerformance.Image.Runtime
|
|
{
|
|
internal static unsafe class MemoryStats
|
|
{
|
|
private static int _allocations;
|
|
|
|
public static int Allocations
|
|
{
|
|
get
|
|
{
|
|
return _allocations;
|
|
}
|
|
}
|
|
|
|
internal static void Allocated()
|
|
{
|
|
Interlocked.Increment(ref _allocations);
|
|
}
|
|
|
|
internal static void Freed()
|
|
{
|
|
Interlocked.Decrement(ref _allocations);
|
|
}
|
|
}
|
|
} |