Skip to content

Commit

Permalink
Fix PerBenchmarkDotNet project
Browse files Browse the repository at this point in the history
This has evidently been broken since I regressed it in 5c0220e.
  • Loading branch information
AArnott committed Aug 2, 2022
1 parent 8fe5fc9 commit 1092f85
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions sandbox/PerfBenchmarkDotNet/MessagePackWriterBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace PerfBenchmarkDotNet
{
[GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory)]
[CategoriesColumn]
public sealed class MessagePackWriterBenchmark : IDisposable
public class MessagePackWriterBenchmark : IDisposable
{
private const int RepsOverArray = 300 * 1024;
private readonly Sequence<byte> sequence = new Sequence<byte>();
Expand Down Expand Up @@ -152,7 +152,16 @@ public void WriteString()

public void Dispose()
{
this.sequence.Dispose();
this.Dispose(true);
GC.SuppressFinalize(this);
}

protected virtual void Dispose(bool disposing)
{
if (disposing)
{
this.sequence.Dispose();
}
}
}
}

0 comments on commit 1092f85

Please sign in to comment.