aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Core/API/Controllers
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-12-15 09:33:34 -0600
committerGitHub <noreply@github.com>2021-12-15 09:33:34 -0600
commit51bcb8d1bed3a01df06fa85b5a252e3c06689e05 (patch)
tree44442b4aa09e6ac1c18f8784dc1b229ff7f0b784 /src/slskd/Core/API/Controllers
parentedf3c940cf46943c5e501db601a2a5b494638796 (diff)
parentdf49c7e5fe5a0e145d5605087fe6df9897106a7f (diff)
downloadslskd-51bcb8d1bed3a01df06fa85b5a252e3c06689e05.tar.gz
Merge pull request #304 from slskd/gc
Manually collect garbage after each search
Diffstat (limited to 'src/slskd/Core/API/Controllers')
-rw-r--r--src/slskd/Core/API/Controllers/ApplicationController.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/slskd/Core/API/Controllers/ApplicationController.cs b/src/slskd/Core/API/Controllers/ApplicationController.cs
index 501f8a9c..19360fe1 100644
--- a/src/slskd/Core/API/Controllers/ApplicationController.cs
+++ b/src/slskd/Core/API/Controllers/ApplicationController.cs
@@ -19,7 +19,6 @@ namespace slskd.Core.API
{
using System;
using System.Diagnostics;
- using System.Runtime;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@@ -128,8 +127,7 @@ namespace slskd.Core.API
[Authorize]
public IActionResult CollectGarbage()
{
- GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
- GC.Collect(2, GCCollectionMode.Forced, blocking: false, compacting: true);
+ Application.CollectGarbage();
return Ok();
}