You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/BenchmarkDotNet/Engines/GcStats.cs
+2
Original file line number
Diff line number
Diff line change
@@ -145,6 +145,8 @@ public static GcStats FromForced(int forcedFullGarbageCollections)
145
145
if(RuntimeInformation.IsWasm)
146
146
returnnull;
147
147
148
+
// Do NOT call GC.Collect() here, as it causes finalizers to run and possibly allocate. https://github.com/dotnet/runtime/issues/101536#issuecomment-2077533242
149
+
// Instead, we call it before we start the measurement in the Engine.
0 commit comments