Comment Comment by akshat_h I haven't personally used this, but does this work?GC.TryStartNoGCRegion MethodAttempts to disallow garbage collection during the execution of a critical path.https://docs.microsoft.com/en-us/dotnet/api/system.gc.trysta... parent akshat_h 5 years ago
GC.TryStartNoGCRegion Method
Attempts to disallow garbage collection during the execution of a critical path.
https://docs.microsoft.com/en-us/dotnet/api/system.gc.trysta...