From defed728625c7d50f7c959411828ce1e5593fc42 Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Sat, 18 Feb 2023 21:30:17 -0700 Subject: [PATCH] Force garbage collection after completing a Processable --- Source/FileLiberator/Processable.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/FileLiberator/Processable.cs b/Source/FileLiberator/Processable.cs index 37a971b2..49ecd61b 100644 --- a/Source/FileLiberator/Processable.cs +++ b/Source/FileLiberator/Processable.cs @@ -54,6 +54,8 @@ namespace FileLiberator = (await ProcessAsync(libraryBook)) ?? new StatusHandler { "Processable should never return a null status" }; + GC.Collect(GC.MaxGeneration, GCCollectionMode.Aggressive, true, true); + return status; }