Merge pull request #1587 from DGP-Studio/refactor/httpclient_recycle

This commit is contained in:
DismissedLight
2024-04-30 09:41:20 +08:00
committed by GitHub
2 changed files with 1 additions and 1 deletions

View File

@@ -104,6 +104,7 @@ internal class ScopedPage : Page
// Dispose the scope
pageScope.Dispose();
GC.Collect(GC.MaxGeneration, GCCollectionMode.Aggressive, true);
}
}
}

View File

@@ -22,7 +22,6 @@ internal sealed partial class ScopedPageScopeReferenceTracker : IScopedPageScope
public IServiceScope CreateScope()
{
GC.Collect(GC.MaxGeneration, GCCollectionMode.Aggressive, true);
IServiceScope currentScope = serviceProvider.CreateScope();
// In case previous one is not disposed.