Skip to content

Commit

Permalink
Fixed: BenchmarkDotNet Error on Building Some Benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Mar 23, 2024
1 parent 2c31a5e commit 5d13b25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Reloaded.Memory.Benchmarks/Benchmarks/FixedArrayPtr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public void Setup()
}

[GlobalCleanup]
public bool Cleanup() => new Reloaded.Memory.Memory().Free(_allocation);
// ReSharper disable once ReturnValueOfPureMethodIsNotUsed
public void Cleanup() => new Reloaded.Memory.Memory().Free(_allocation);

[Benchmark]
public void FixedArrayPtr_CopyFrom() => _fixedArrayPtr.CopyFrom(_sourceArray, ArrayLength);
Expand Down
3 changes: 2 additions & 1 deletion src/Reloaded.Memory.Benchmarks/Benchmarks/Memory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public unsafe class Memory
public void Setup() => Alloc = new Reloaded.Memory.Memory().Allocate(DataSize);

[GlobalCleanup]
public bool Cleanup() => new Reloaded.Memory.Memory().Free(Alloc);
// ReSharper disable once ReturnValueOfPureMethodIsNotUsed
public void Cleanup() => new Reloaded.Memory.Memory().Free(Alloc);

// Note: We're not unrolling because we don't care for it to run as fast as possible, only that it's zero overhead.

Expand Down

0 comments on commit 5d13b25

Please sign in to comment.