From 73c48305a12edd212b3b7f0b8cf6089e9fa1dea0 Mon Sep 17 00:00:00 2001 From: Chomp Date: Tue, 28 Jan 2025 10:14:08 +0000 Subject: [PATCH] Add garbage collection after raid has been generated --- Libraries/Core/Services/LocationLifecycleService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/Core/Services/LocationLifecycleService.cs b/Libraries/Core/Services/LocationLifecycleService.cs index 9830ae08..51499fe5 100644 --- a/Libraries/Core/Services/LocationLifecycleService.cs +++ b/Libraries/Core/Services/LocationLifecycleService.cs @@ -175,10 +175,12 @@ public class LocationLifecycleService AdjustExtracts(request.PlayerSide, request.Location, result.LocationLoot); - // Clear bot cache ready for a fresh raid + // Clear bot cache ready for next raid after this _botGenerationCacheService.ClearStoredBots(); _botNameService.ClearNameCache(); + GC.Collect(GC.MaxGeneration, GCCollectionMode.Aggressive, true, true); + return result; }