File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
sandbox/PerfBenchmarkDotNet Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ namespace PerfBenchmarkDotNet
13
13
{
14
14
[ GroupBenchmarksBy ( BenchmarkLogicalGroupRule . ByCategory ) ]
15
15
[ CategoriesColumn ]
16
- public sealed class MessagePackWriterBenchmark : IDisposable
16
+ public class MessagePackWriterBenchmark : IDisposable
17
17
{
18
18
private const int RepsOverArray = 300 * 1024 ;
19
19
private readonly Sequence < byte > sequence = new Sequence < byte > ( ) ;
@@ -152,7 +152,16 @@ public void WriteString()
152
152
153
153
public void Dispose ( )
154
154
{
155
- this . sequence . Dispose ( ) ;
155
+ this . Dispose ( true ) ;
156
+ GC . SuppressFinalize ( this ) ;
157
+ }
158
+
159
+ protected virtual void Dispose ( bool disposing )
160
+ {
161
+ if ( disposing )
162
+ {
163
+ this . sequence . Dispose ( ) ;
164
+ }
156
165
}
157
166
}
158
167
}
You can’t perform that action at this time.
0 commit comments