Skip to content

Commit 5d13b25

Browse files
committed
Fixed: BenchmarkDotNet Error on Building Some Benchmarks
1 parent 2c31a5e commit 5d13b25

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/Reloaded.Memory.Benchmarks/Benchmarks/FixedArrayPtr.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ public void Setup()
3232
}
3333

3434
[GlobalCleanup]
35-
public bool Cleanup() => new Reloaded.Memory.Memory().Free(_allocation);
35+
// ReSharper disable once ReturnValueOfPureMethodIsNotUsed
36+
public void Cleanup() => new Reloaded.Memory.Memory().Free(_allocation);
3637

3738
[Benchmark]
3839
public void FixedArrayPtr_CopyFrom() => _fixedArrayPtr.CopyFrom(_sourceArray, ArrayLength);

src/Reloaded.Memory.Benchmarks/Benchmarks/Memory.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public unsafe class Memory
1919
public void Setup() => Alloc = new Reloaded.Memory.Memory().Allocate(DataSize);
2020

2121
[GlobalCleanup]
22-
public bool Cleanup() => new Reloaded.Memory.Memory().Free(Alloc);
22+
// ReSharper disable once ReturnValueOfPureMethodIsNotUsed
23+
public void Cleanup() => new Reloaded.Memory.Memory().Free(Alloc);
2324

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

0 commit comments

Comments
 (0)